{"action":"created","comment":{"url":"https://api.github.com/repos/zulip/zulip-electron/pulls/comments/168513564","pull_request_review_id":96893069,"id":168513564,"diff_hunk":"@@ -488,9 +489,14 @@ class ServerManagerView {\n \n window.onload = () => {\n \tconst serverManagerView = new ServerManagerView();\n+\tconst reconnectUtil = new ReconnectUtil(serverManagerView);\n \tserverManagerView.init();\n \twindow.addEventListener('online', () => {\n-\t\tserverManagerView.reloadView();\n+\t\treconnectUtil.pollInternetAndReload();","path":"app/renderer/js/main.js","position":16,"original_position":16,"commit_id":"e7ac78db9bbfaa5beff0c47789bcf6c979020367","original_commit_id":"e7ac78db9bbfaa5beff0c47789bcf6c979020367","user":{"login":"akashnimare","id":2263909,"avatar_url":"https://avatars0.githubusercontent.com/u/2263909?v=4","gravatar_id":"","url":"https://api.github.com/users/akashnimare","html_url":"https://github.com/akashnimare","followers_url":"https://api.github.com/users/akashnimare/followers","following_url":"https://api.github.com/users/akashnimare/following{/other_user}","gists_url":"https://api.github.com/users/akashnimare/gists{/gist_id}","starred_url":"https://api.github.com/users/akashnimare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akashnimare/subscriptions","organizations_url":"https://api.github.com/users/akashnimare/orgs","repos_url":"https://api.github.com/users/akashnimare/repos","events_url":"https://api.github.com/users/akashnimare/events{/privacy}","received_events_url":"https://api.github.com/users/akashnimare/received_events","type":"User","site_admin":false},"body":"Is there a need for adding a console log, just to make the debugging better (for issues like https://github.com/zulip/zulip-electron/issues/312) -\r\n`console.log('You're back online.')`\r\n`console.log('No internet connection, you are offline.')`","created_at":"2018-02-15T15:39:05Z","updated_at":"2018-02-15T15:39:05Z","html_url":"https://github.com/zulip/zulip-electron/pull/415#discussion_r168513564","pull_request_url":"https://api.github.com/repos/zulip/zulip-electron/pulls/415","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/zulip/zulip-electron/pulls/comments/168513564"},"html":{"href":"https://github.com/zulip/zulip-electron/pull/415#discussion_r168513564"},"pull_request":{"href":"https://api.github.com/repos/zulip/zulip-electron/pulls/415"}}},"pull_request":{"url":"https://api.github.com/repos/zulip/zulip-electron/pulls/415","id":169137343,"html_url":"https://github.com/zulip/zulip-electron/pull/415","diff_url":"https://github.com/zulip/zulip-electron/pull/415.diff","patch_url":"https://github.com/zulip/zulip-electron/pull/415.patch","issue_url":"https://api.github.com/repos/zulip/zulip-electron/issues/415","number":415,"state":"open","locked":false,"title":"reconnect: Check wheather internet is working before reloading.","user":{"login":"cPhost","id":23620441,"avatar_url":"https://avatars2.githubusercontent.com/u/23620441?v=4","gravatar_id":"","url":"https://api.github.com/users/cPhost","html_url":"https://github.com/cPhost","followers_url":"https://api.github.com/users/cPhost/followers","following_url":"https://api.github.com/users/cPhost/following{/other_user}","gists_url":"https://api.github.com/users/cPhost/gists{/gist_id}","starred_url":"https://api.github.com/users/cPhost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cPhost/subscriptions","organizations_url":"https://api.github.com/users/cPhost/orgs","repos_url":"https://api.github.com/users/cPhost/repos","events_url":"https://api.github.com/users/cPhost/events{/privacy}","received_events_url":"https://api.github.com/users/cPhost/received_events","type":"User","site_admin":false},"body":"When online event is triggered check weather the internet is atually working or not.\r\nCommonly on windows it turns out that internet takes couple of seconds to boot up after\r\nconnecting to internet or in some cases this might be they have to sign in to internet service\r\nportal in order to access internet.\r\n","created_at":"2018-02-14T15:16:48Z","updated_at":"2018-02-15T15:39:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa337f88e6a93c684b2bb359e08ec27ab425a8fa","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":805493159,"url":"https://api.github.com/repos/zulip/zulip-electron/labels/size:%20XL","name":"size: XL","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/zulip/zulip-electron/pulls/415/commits","review_comments_url":"https://api.github.com/repos/zulip/zulip-electron/pulls/415/comments","review_comment_url":"https://api.github.com/repos/zulip/zulip-electron/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zulip/zulip-electron/issues/415/comments","statuses_url":"https://api.github.com/repos/zulip/zulip-electron/statuses/e7ac78db9bbfaa5beff0c47789bcf6c979020367","head":{"label":"cPhost:check-internet","ref":"check-internet","sha":"e7ac78db9bbfaa5beff0c47789bcf6c979020367","user":{"login":"cPhost","id":23620441,"avatar_url":"https://avatars2.githubusercontent.com/u/23620441?v=4","gravatar_id":"","url":"https://api.github.com/users/cPhost","html_url":"https://github.com/cPhost","followers_url":"https://api.github.com/users/cPhost/followers","following_url":"https://api.github.com/users/cPhost/following{/other_user}","gists_url":"https://api.github.com/users/cPhost/gists{/gist_id}","starred_url":"https://api.github.com/users/cPhost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cPhost/subscriptions","organizations_url":"https://api.github.com/users/cPhost/orgs","repos_url":"https://api.github.com/users/cPhost/repos","events_url":"https://api.github.com/users/cPhost/events{/privacy}","received_events_url":"https://api.github.com/users/cPhost/received_events","type":"User","site_admin":false},"repo":{"id":112798944,"name":"zulip-electron","full_name":"cPhost/zulip-electron","owner":{"login":"cPhost","id":23620441,"avatar_url":"https://avatars2.githubusercontent.com/u/23620441?v=4","gravatar_id":"","url":"https://api.github.com/users/cPhost","html_url":"https://github.com/cPhost","followers_url":"https://api.github.com/users/cPhost/followers","following_url":"https://api.github.com/users/cPhost/following{/other_user}","gists_url":"https://api.github.com/users/cPhost/gists{/gist_id}","starred_url":"https://api.github.com/users/cPhost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cPhost/subscriptions","organizations_url":"https://api.github.com/users/cPhost/orgs","repos_url":"https://api.github.com/users/cPhost/repos","events_url":"https://api.github.com/users/cPhost/events{/privacy}","received_events_url":"https://api.github.com/users/cPhost/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cPhost/zulip-electron","description":"Zulip Desktop Client","fork":true,"url":"https://api.github.com/repos/cPhost/zulip-electron","forks_url":"https://api.github.com/repos/cPhost/zulip-electron/forks","keys_url":"https://api.github.com/repos/cPhost/zulip-electron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cPhost/zulip-electron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cPhost/zulip-electron/teams","hooks_url":"https://api.github.com/repos/cPhost/zulip-electron/hooks","issue_events_url":"https://api.github.com/repos/cPhost/zulip-electron/issues/events{/number}","events_url":"https://api.github.com/repos/cPhost/zulip-electron/events","assignees_url":"https://api.github.com/repos/cPhost/zulip-electron/assignees{/user}","branches_url":"https://api.github.com/repos/cPhost/zulip-electron/branches{/branch}","tags_url":"https://api.github.com/repos/cPhost/zulip-electron/tags","blobs_url":"https://api.github.com/repos/cPhost/zulip-electron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cPhost/zulip-electron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cPhost/zulip-electron/git/refs{/sha}","trees_url":"https://api.github.com/repos/cPhost/zulip-electron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cPhost/zulip-electron/statuses/{sha}","languages_url":"https://api.github.com/repos/cPhost/zulip-electron/languages","stargazers_url":"https://api.github.com/repos/cPhost/zulip-electron/stargazers","contributors_url":"https://api.github.com/repos/cPhost/zulip-electron/contributors","subscribers_url":"https://api.github.com/repos/cPhost/zulip-electron/subscribers","subscription_url":"https://api.github.com/repos/cPhost/zulip-electron/subscription","commits_url":"https://api.github.com/repos/cPhost/zulip-electron/commits{/sha}","git_commits_url":"https://api.github.com/repos/cPhost/zulip-electron/git/commits{/sha}","comments_url":"https://api.github.com/repos/cPhost/zulip-electron/comments{/number}","issue_comment_url":"https://api.github.com/repos/cPhost/zulip-electron/issues/comments{/number}","contents_url":"https://api.github.com/repos/cPhost/zulip-electron/contents/{+path}","compare_url":"https://api.github.com/repos/cPhost/zulip-electron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cPhost/zulip-electron/merges","archive_url":"https://api.github.com/repos/cPhost/zulip-electron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cPhost/zulip-electron/downloads","issues_url":"https://api.github.com/repos/cPhost/zulip-electron/issues{/number}","pulls_url":"https://api.github.com/repos/cPhost/zulip-electron/pulls{/number}","milestones_url":"https://api.github.com/repos/cPhost/zulip-electron/milestones{/number}","notifications_url":"https://api.github.com/repos/cPhost/zulip-electron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cPhost/zulip-electron/labels{/name}","releases_url":"https://api.github.com/repos/cPhost/zulip-electron/releases{/id}","deployments_url":"https://api.github.com/repos/cPhost/zulip-electron/deployments","created_at":"2017-12-02T00:12:07Z","updated_at":"2018-01-20T00:40:07Z","pushed_at":"2018-02-15T15:22:32Z","git_url":"git://github.com/cPhost/zulip-electron.git","ssh_url":"git@github.com:cPhost/zulip-electron.git","clone_url":"https://github.com/cPhost/zulip-electron.git","svn_url":"https://github.com/cPhost/zulip-electron","homepage":"https://zulipchat.com/apps","size":1735,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zulip:master","ref":"master","sha":"55ae71c00cd80eda752e8c002a009810c319df35","user":{"login":"zulip","id":4921959,"avatar_url":"https://avatars2.githubusercontent.com/u/4921959?v=4","gravatar_id":"","url":"https://api.github.com/users/zulip","html_url":"https://github.com/zulip","followers_url":"https://api.github.com/users/zulip/followers","following_url":"https://api.github.com/users/zulip/following{/other_user}","gists_url":"https://api.github.com/users/zulip/gists{/gist_id}","starred_url":"https://api.github.com/users/zulip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zulip/subscriptions","organizations_url":"https://api.github.com/users/zulip/orgs","repos_url":"https://api.github.com/users/zulip/repos","events_url":"https://api.github.com/users/zulip/events{/privacy}","received_events_url":"https://api.github.com/users/zulip/received_events","type":"Organization","site_admin":false},"repo":{"id":60656871,"name":"zulip-electron","full_name":"zulip/zulip-electron","owner":{"login":"zulip","id":4921959,"avatar_url":"https://avatars2.githubusercontent.com/u/4921959?v=4","gravatar_id":"","url":"https://api.github.com/users/zulip","html_url":"https://github.com/zulip","followers_url":"https://api.github.com/users/zulip/followers","following_url":"https://api.github.com/users/zulip/following{/other_user}","gists_url":"https://api.github.com/users/zulip/gists{/gist_id}","starred_url":"https://api.github.com/users/zulip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zulip/subscriptions","organizations_url":"https://api.github.com/users/zulip/orgs","repos_url":"https://api.github.com/users/zulip/repos","events_url":"https://api.github.com/users/zulip/events{/privacy}","received_events_url":"https://api.github.com/users/zulip/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zulip/zulip-electron","description":"Zulip Desktop Client","fork":false,"url":"https://api.github.com/repos/zulip/zulip-electron","forks_url":"https://api.github.com/repos/zulip/zulip-electron/forks","keys_url":"https://api.github.com/repos/zulip/zulip-electron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zulip/zulip-electron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zulip/zulip-electron/teams","hooks_url":"https://api.github.com/repos/zulip/zulip-electron/hooks","issue_events_url":"https://api.github.com/repos/zulip/zulip-electron/issues/events{/number}","events_url":"https://api.github.com/repos/zulip/zulip-electron/events","assignees_url":"https://api.github.com/repos/zulip/zulip-electron/assignees{/user}","branches_url":"https://api.github.com/repos/zulip/zulip-electron/branches{/branch}","tags_url":"https://api.github.com/repos/zulip/zulip-electron/tags","blobs_url":"https://api.github.com/repos/zulip/zulip-electron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zulip/zulip-electron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zulip/zulip-electron/git/refs{/sha}","trees_url":"https://api.github.com/repos/zulip/zulip-electron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zulip/zulip-electron/statuses/{sha}","languages_url":"https://api.github.com/repos/zulip/zulip-electron/languages","stargazers_url":"https://api.github.com/repos/zulip/zulip-electron/stargazers","contributors_url":"https://api.github.com/repos/zulip/zulip-electron/contributors","subscribers_url":"https://api.github.com/repos/zulip/zulip-electron/subscribers","subscription_url":"https://api.github.com/repos/zulip/zulip-electron/subscription","commits_url":"https://api.github.com/repos/zulip/zulip-electron/commits{/sha}","git_commits_url":"https://api.github.com/repos/zulip/zulip-electron/git/commits{/sha}","comments_url":"https://api.github.com/repos/zulip/zulip-electron/comments{/number}","issue_comment_url":"https://api.github.com/repos/zulip/zulip-electron/issues/comments{/number}","contents_url":"https://api.github.com/repos/zulip/zulip-electron/contents/{+path}","compare_url":"https://api.github.com/repos/zulip/zulip-electron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zulip/zulip-electron/merges","archive_url":"https://api.github.com/repos/zulip/zulip-electron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zulip/zulip-electron/downloads","issues_url":"https://api.github.com/repos/zulip/zulip-electron/issues{/number}","pulls_url":"https://api.github.com/repos/zulip/zulip-electron/pulls{/number}","milestones_url":"https://api.github.com/repos/zulip/zulip-electron/milestones{/number}","notifications_url":"https://api.github.com/repos/zulip/zulip-electron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zulip/zulip-electron/labels{/name}","releases_url":"https://api.github.com/repos/zulip/zulip-electron/releases{/id}","deployments_url":"https://api.github.com/repos/zulip/zulip-electron/deployments","created_at":"2016-06-08T00:48:28Z","updated_at":"2018-02-15T12:05:10Z","pushed_at":"2018-02-15T15:22:33Z","git_url":"git://github.com/zulip/zulip-electron.git","ssh_url":"git@github.com:zulip/zulip-electron.git","clone_url":"https://github.com/zulip/zulip-electron.git","svn_url":"https://github.com/zulip/zulip-electron","homepage":"https://zulipchat.com/apps","size":1501,"stargazers_count":233,"watchers_count":233,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":105,"mirror_url":null,"archived":false,"open_issues_count":43,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":105,"open_issues":43,"watchers":233,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zulip/zulip-electron/pulls/415"},"html":{"href":"https://github.com/zulip/zulip-electron/pull/415"},"issue":{"href":"https://api.github.com/repos/zulip/zulip-electron/issues/415"},"comments":{"href":"https://api.github.com/repos/zulip/zulip-electron/issues/415/comments"},"review_comments":{"href":"https://api.github.com/repos/zulip/zulip-electron/pulls/415/comments"},"review_comment":{"href":"https://api.github.com/repos/zulip/zulip-electron/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zulip/zulip-electron/pulls/415/commits"},"statuses":{"href":"https://api.github.com/repos/zulip/zulip-electron/statuses/e7ac78db9bbfaa5beff0c47789bcf6c979020367"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"akashnimare"}}