{"action":"created","comment":{"url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/pulls/comments/79278500","id":79278500,"diff_hunk":"@@ -12,10 +13,26 @@ class AppTray {\n   constructor(splashWindow, wechatWindow) {\n     this.splashWindow = splashWindow;\n     this.wechatWindow = wechatWindow;\n+    this.TRAY_CONFIG_PATH = path.join(app.getPath('appData'),'electronic-wechat/trayConfig.json');\n+    this.lastUnreadStat = 0;\n \n+    fs.readFile(this.TRAY_CONFIG_PATH, (err, data) => {\n+      if(err) {\n+        this.trayColor = 'white';\n+        fs.writeFile(this.TRAY_CONFIG_PATH, '{\"color\":\"white\"}');\n+      } else {\n+        this.trayColor = JSON.parse(data.toString()).color;\n+      }\n+      this.creatTray();\n+    });\n+  }\n+\n+  creatTray() {","path":"src/windows/controllers/app_tray.js","position":26,"original_position":26,"commit_id":"1506720bea9c25087ac90c9c3878969bcb6ff319","original_commit_id":"1506720bea9c25087ac90c9c3878969bcb6ff319","user":{"login":"Kulbear","id":14886380,"avatar_url":"https://avatars.githubusercontent.com/u/14886380?v=3","gravatar_id":"","url":"https://api.github.com/users/Kulbear","html_url":"https://github.com/Kulbear","followers_url":"https://api.github.com/users/Kulbear/followers","following_url":"https://api.github.com/users/Kulbear/following{/other_user}","gists_url":"https://api.github.com/users/Kulbear/gists{/gist_id}","starred_url":"https://api.github.com/users/Kulbear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kulbear/subscriptions","organizations_url":"https://api.github.com/users/Kulbear/orgs","repos_url":"https://api.github.com/users/Kulbear/repos","events_url":"https://api.github.com/users/Kulbear/events{/privacy}","received_events_url":"https://api.github.com/users/Kulbear/received_events","type":"User","site_admin":false},"body":"creatTray() \r\n这个？","created_at":"2016-09-17T07:36:50Z","updated_at":"2016-09-17T07:37:09Z","html_url":"https://github.com/geeeeeeeeek/electronic-wechat/pull/344#discussion_r79278500","pull_request_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/pulls/344","_links":{"self":{"href":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/pulls/comments/79278500"},"html":{"href":"https://github.com/geeeeeeeeek/electronic-wechat/pull/344#discussion_r79278500"},"pull_request":{"href":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/pulls/344"}}},"pull_request":{"url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/pulls/344","id":85589687,"html_url":"https://github.com/geeeeeeeeek/electronic-wechat/pull/344","diff_url":"https://github.com/geeeeeeeeek/electronic-wechat/pull/344.diff","patch_url":"https://github.com/geeeeeeeeek/electronic-wechat/pull/344.patch","issue_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/issues/344","number":344,"state":"open","locked":false,"title":"custom tray icon color on linux","user":{"login":"Rocket1184","id":13914967,"avatar_url":"https://avatars.githubusercontent.com/u/13914967?v=3","gravatar_id":"","url":"https://api.github.com/users/Rocket1184","html_url":"https://github.com/Rocket1184","followers_url":"https://api.github.com/users/Rocket1184/followers","following_url":"https://api.github.com/users/Rocket1184/following{/other_user}","gists_url":"https://api.github.com/users/Rocket1184/gists{/gist_id}","starred_url":"https://api.github.com/users/Rocket1184/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rocket1184/subscriptions","organizations_url":"https://api.github.com/users/Rocket1184/orgs","repos_url":"https://api.github.com/users/Rocket1184/repos","events_url":"https://api.github.com/users/Rocket1184/events{/privacy}","received_events_url":"https://api.github.com/users/Rocket1184/received_events","type":"User","site_admin":false},"body":"add tray icon menu \"ChangeIconColor\" for linux system.\r\nable to save config file in `~/.config/electronic-wechat/trayConfig.json`","created_at":"2016-09-16T15:08:14Z","updated_at":"2016-09-17T07:37:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8218909b8f9830db7c0191f0a9476a44213666c7","assignee":{"login":"Kulbear","id":14886380,"avatar_url":"https://avatars.githubusercontent.com/u/14886380?v=3","gravatar_id":"","url":"https://api.github.com/users/Kulbear","html_url":"https://github.com/Kulbear","followers_url":"https://api.github.com/users/Kulbear/followers","following_url":"https://api.github.com/users/Kulbear/following{/other_user}","gists_url":"https://api.github.com/users/Kulbear/gists{/gist_id}","starred_url":"https://api.github.com/users/Kulbear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kulbear/subscriptions","organizations_url":"https://api.github.com/users/Kulbear/orgs","repos_url":"https://api.github.com/users/Kulbear/repos","events_url":"https://api.github.com/users/Kulbear/events{/privacy}","received_events_url":"https://api.github.com/users/Kulbear/received_events","type":"User","site_admin":false},"assignees":[{"login":"Kulbear","id":14886380,"avatar_url":"https://avatars.githubusercontent.com/u/14886380?v=3","gravatar_id":"","url":"https://api.github.com/users/Kulbear","html_url":"https://github.com/Kulbear","followers_url":"https://api.github.com/users/Kulbear/followers","following_url":"https://api.github.com/users/Kulbear/following{/other_user}","gists_url":"https://api.github.com/users/Kulbear/gists{/gist_id}","starred_url":"https://api.github.com/users/Kulbear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kulbear/subscriptions","organizations_url":"https://api.github.com/users/Kulbear/orgs","repos_url":"https://api.github.com/users/Kulbear/repos","events_url":"https://api.github.com/users/Kulbear/events{/privacy}","received_events_url":"https://api.github.com/users/Kulbear/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/pulls/344/commits","review_comments_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/pulls/344/comments","review_comment_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/issues/344/comments","statuses_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/statuses/1506720bea9c25087ac90c9c3878969bcb6ff319","head":{"label":"Rocket1184:feature/custom-tray-icon","ref":"feature/custom-tray-icon","sha":"1506720bea9c25087ac90c9c3878969bcb6ff319","user":{"login":"Rocket1184","id":13914967,"avatar_url":"https://avatars.githubusercontent.com/u/13914967?v=3","gravatar_id":"","url":"https://api.github.com/users/Rocket1184","html_url":"https://github.com/Rocket1184","followers_url":"https://api.github.com/users/Rocket1184/followers","following_url":"https://api.github.com/users/Rocket1184/following{/other_user}","gists_url":"https://api.github.com/users/Rocket1184/gists{/gist_id}","starred_url":"https://api.github.com/users/Rocket1184/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rocket1184/subscriptions","organizations_url":"https://api.github.com/users/Rocket1184/orgs","repos_url":"https://api.github.com/users/Rocket1184/repos","events_url":"https://api.github.com/users/Rocket1184/events{/privacy}","received_events_url":"https://api.github.com/users/Rocket1184/received_events","type":"User","site_admin":false},"repo":{"id":67480123,"name":"electronic-wechat","full_name":"Rocket1184/electronic-wechat","owner":{"login":"Rocket1184","id":13914967,"avatar_url":"https://avatars.githubusercontent.com/u/13914967?v=3","gravatar_id":"","url":"https://api.github.com/users/Rocket1184","html_url":"https://github.com/Rocket1184","followers_url":"https://api.github.com/users/Rocket1184/followers","following_url":"https://api.github.com/users/Rocket1184/following{/other_user}","gists_url":"https://api.github.com/users/Rocket1184/gists{/gist_id}","starred_url":"https://api.github.com/users/Rocket1184/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rocket1184/subscriptions","organizations_url":"https://api.github.com/users/Rocket1184/orgs","repos_url":"https://api.github.com/users/Rocket1184/repos","events_url":"https://api.github.com/users/Rocket1184/events{/privacy}","received_events_url":"https://api.github.com/users/Rocket1184/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rocket1184/electronic-wechat","description":":speech_balloon: A better WeChat on macOS and Linux. Built with Electron by Zhongyi Tong.","fork":true,"url":"https://api.github.com/repos/Rocket1184/electronic-wechat","forks_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/forks","keys_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/teams","hooks_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/hooks","issue_events_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/issues/events{/number}","events_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/events","assignees_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/assignees{/user}","branches_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/branches{/branch}","tags_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/tags","blobs_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/statuses/{sha}","languages_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/languages","stargazers_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/stargazers","contributors_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/contributors","subscribers_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/subscribers","subscription_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/subscription","commits_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/contents/{+path}","compare_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/merges","archive_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/downloads","issues_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/issues{/number}","pulls_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/pulls{/number}","milestones_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/milestones{/number}","notifications_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/labels{/name}","releases_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/releases{/id}","deployments_url":"https://api.github.com/repos/Rocket1184/electronic-wechat/deployments","created_at":"2016-09-06T06:31:37Z","updated_at":"2016-09-06T06:31:39Z","pushed_at":"2016-09-17T07:11:25Z","git_url":"git://github.com/Rocket1184/electronic-wechat.git","ssh_url":"git@github.com:Rocket1184/electronic-wechat.git","clone_url":"https://github.com/Rocket1184/electronic-wechat.git","svn_url":"https://github.com/Rocket1184/electronic-wechat","homepage":"","size":1022,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"geeeeeeeeek:master","ref":"master","sha":"0694b28062a68144b9ad4159f69eb0c85adb92e1","user":{"login":"geeeeeeeeek","id":7262715,"avatar_url":"https://avatars.githubusercontent.com/u/7262715?v=3","gravatar_id":"","url":"https://api.github.com/users/geeeeeeeeek","html_url":"https://github.com/geeeeeeeeek","followers_url":"https://api.github.com/users/geeeeeeeeek/followers","following_url":"https://api.github.com/users/geeeeeeeeek/following{/other_user}","gists_url":"https://api.github.com/users/geeeeeeeeek/gists{/gist_id}","starred_url":"https://api.github.com/users/geeeeeeeeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geeeeeeeeek/subscriptions","organizations_url":"https://api.github.com/users/geeeeeeeeek/orgs","repos_url":"https://api.github.com/users/geeeeeeeeek/repos","events_url":"https://api.github.com/users/geeeeeeeeek/events{/privacy}","received_events_url":"https://api.github.com/users/geeeeeeeeek/received_events","type":"User","site_admin":false},"repo":{"id":51994692,"name":"electronic-wechat","full_name":"geeeeeeeeek/electronic-wechat","owner":{"login":"geeeeeeeeek","id":7262715,"avatar_url":"https://avatars.githubusercontent.com/u/7262715?v=3","gravatar_id":"","url":"https://api.github.com/users/geeeeeeeeek","html_url":"https://github.com/geeeeeeeeek","followers_url":"https://api.github.com/users/geeeeeeeeek/followers","following_url":"https://api.github.com/users/geeeeeeeeek/following{/other_user}","gists_url":"https://api.github.com/users/geeeeeeeeek/gists{/gist_id}","starred_url":"https://api.github.com/users/geeeeeeeeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geeeeeeeeek/subscriptions","organizations_url":"https://api.github.com/users/geeeeeeeeek/orgs","repos_url":"https://api.github.com/users/geeeeeeeeek/repos","events_url":"https://api.github.com/users/geeeeeeeeek/events{/privacy}","received_events_url":"https://api.github.com/users/geeeeeeeeek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geeeeeeeeek/electronic-wechat","description":":speech_balloon: A better WeChat on macOS and Linux. Built with Electron by Zhongyi Tong.","fork":false,"url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat","forks_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/forks","keys_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/teams","hooks_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/hooks","issue_events_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/issues/events{/number}","events_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/events","assignees_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/assignees{/user}","branches_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/branches{/branch}","tags_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/tags","blobs_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/git/refs{/sha}","trees_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/statuses/{sha}","languages_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/languages","stargazers_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/stargazers","contributors_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/contributors","subscribers_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/subscribers","subscription_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/subscription","commits_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/commits{/sha}","git_commits_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/git/commits{/sha}","comments_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/comments{/number}","issue_comment_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/issues/comments{/number}","contents_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/contents/{+path}","compare_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/merges","archive_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/downloads","issues_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/issues{/number}","pulls_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/pulls{/number}","milestones_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/milestones{/number}","notifications_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/labels{/name}","releases_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/releases{/id}","deployments_url":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/deployments","created_at":"2016-02-18T09:09:53Z","updated_at":"2016-09-17T05:27:55Z","pushed_at":"2016-09-17T07:11:27Z","git_url":"git://github.com/geeeeeeeeek/electronic-wechat.git","ssh_url":"git@github.com:geeeeeeeeek/electronic-wechat.git","clone_url":"https://github.com/geeeeeeeeek/electronic-wechat.git","svn_url":"https://github.com/geeeeeeeeek/electronic-wechat","homepage":"","size":1259,"stargazers_count":4957,"watchers_count":4957,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":759,"mirror_url":null,"open_issues_count":44,"forks":759,"open_issues":44,"watchers":4957,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/pulls/344"},"html":{"href":"https://github.com/geeeeeeeeek/electronic-wechat/pull/344"},"issue":{"href":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/issues/344"},"comments":{"href":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/issues/344/comments"},"review_comments":{"href":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/pulls/344/comments"},"review_comment":{"href":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/pulls/344/commits"},"statuses":{"href":"https://api.github.com/repos/geeeeeeeeek/electronic-wechat/statuses/1506720bea9c25087ac90c9c3878969bcb6ff319"}}}}
{"actor":{"display_login":"Kulbear"}}