{"action":"created","comment":{"url":"https://api.github.com/repos/harman-red-square/gaia/pulls/comments/44531945","id":44531945,"diff_hunk":"@@ -45,31 +48,55 @@\n         return  name ? name : self.entry.name;\n       }\n \n-      this.element.removeEventListener('click', this);\n+      //TODO: it is necessary to delete elements from pinned app list from\n+      //page not hide them and refresh target app for example when application\n+      //is being uninstalled.\n       if(this.targetApp) {\n+        var manifest = this.targetApp.manifest;\n+        var entry_point = this.entry.entry_point;\n+        var appIcons = [];\n+\n         this.icon.style.visibility = 'visible';\n         this.title.style.visibility = 'visible';\n-        this.element.dataset.manifesturl = this.entry.manifestURL;\n-        this.element.dataset.entrypoint = this.entry.entry_point;\n-        if(this.entry.icon) {\n-          this.icon.src = this.entry.icon;\n+\n+        if (this.entry){\n           this.element.addEventListener('click', this);\n-        }\n \n-        if (this.entry.locales) {\n-          this.title.textContent = getName();\n-        } else if (this.entry.name) {\n-          var manifest = this.targetApp.manifest;\n-          var entry_point = this.entry.entry_point;\n-          this.entry.locales = manifest.entry_points && entry_point ?\n+          this.element.dataset.manifesturl = this.entry.manifestURL;\n+          this.element.dataset.entrypoint = this.entry.entry_point;\n+\n+          if (manifest.entry_points) {\n+            if (entry_point) {\n+              appIcons = manifest.entry_points[entry_point].icons;\n+            }else{\n+              console.error('Entry point must be defined');\n+            }\n+          } else {\n+            appIcons = manifest.icons;\n+          }\n+\n+          for (var size in appIcons) {\n+            if (size >= 75) {\n+              var mainURL = this.entry.manifestURL.split('/');\n+              mainURL.splice(-1, 1);\n+              this.icon.src = mainURL.join('/') + appIcons[size];\n+              break;\n+            }\n+          }\n+\n+          if (this.entry.locales) {\n+            this.title.textContent = getName();\n+          } else {\n+            this.entry.locales = manifest.entry_points && entry_point ?\n                                 manifest.entry_points[entry_point].locales :","path":"apps/verticalhome/js/pin_apps.js","position":117,"original_position":117,"commit_id":"77aa3196472ac490d6c28803f6b50059b47f5e4b","original_commit_id":"77aa3196472ac490d6c28803f6b50059b47f5e4b","user":{"login":"egorlevichev","id":7557901,"avatar_url":"https://avatars.githubusercontent.com/u/7557901?v=3","gravatar_id":"","url":"https://api.github.com/users/egorlevichev","html_url":"https://github.com/egorlevichev","followers_url":"https://api.github.com/users/egorlevichev/followers","following_url":"https://api.github.com/users/egorlevichev/following{/other_user}","gists_url":"https://api.github.com/users/egorlevichev/gists{/gist_id}","starred_url":"https://api.github.com/users/egorlevichev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egorlevichev/subscriptions","organizations_url":"https://api.github.com/users/egorlevichev/orgs","repos_url":"https://api.github.com/users/egorlevichev/repos","events_url":"https://api.github.com/users/egorlevichev/events{/privacy}","received_events_url":"https://api.github.com/users/egorlevichev/received_events","type":"User","site_admin":false},"body":"indentation wrong again :no_good:","created_at":"2015-11-11T13:33:49Z","updated_at":"2015-11-11T13:33:49Z","html_url":"https://github.com/harman-red-square/gaia/pull/29#discussion_r44531945","pull_request_url":"https://api.github.com/repos/harman-red-square/gaia/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/harman-red-square/gaia/pulls/comments/44531945"},"html":{"href":"https://github.com/harman-red-square/gaia/pull/29#discussion_r44531945"},"pull_request":{"href":"https://api.github.com/repos/harman-red-square/gaia/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/harman-red-square/gaia/pulls/29","id":50123731,"html_url":"https://github.com/harman-red-square/gaia/pull/29","diff_url":"https://github.com/harman-red-square/gaia/pull/29.diff","patch_url":"https://github.com/harman-red-square/gaia/pull/29.patch","issue_url":"https://api.github.com/repos/harman-red-square/gaia/issues/29","number":29,"state":"open","locked":false,"title":"Bug 1210304 - David's comments by homescreen","user":{"login":"ruvsmirnov","id":14997339,"avatar_url":"https://avatars.githubusercontent.com/u/14997339?v=3","gravatar_id":"","url":"https://api.github.com/users/ruvsmirnov","html_url":"https://github.com/ruvsmirnov","followers_url":"https://api.github.com/users/ruvsmirnov/followers","following_url":"https://api.github.com/users/ruvsmirnov/following{/other_user}","gists_url":"https://api.github.com/users/ruvsmirnov/gists{/gist_id}","starred_url":"https://api.github.com/users/ruvsmirnov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruvsmirnov/subscriptions","organizations_url":"https://api.github.com/users/ruvsmirnov/orgs","repos_url":"https://api.github.com/users/ruvsmirnov/repos","events_url":"https://api.github.com/users/ruvsmirnov/events{/privacy}","received_events_url":"https://api.github.com/users/ruvsmirnov/received_events","type":"User","site_admin":false},"body":"**David's comments mostly related to pin app navigation:**\r\n  * Fixed minor bugs\r\n  * Removed not used strings\r\n  * Deleted free spaces\r\n  * Initialization of variables moved to constructor\r\n  * Everywhere changed .call(this) to self=this\r\n  * Changed some logic of pin apps navigation","created_at":"2015-11-09T13:46:51Z","updated_at":"2015-11-11T13:33:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9dbe57eaed7f32afa802d592e8a9b492b6833e0f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/harman-red-square/gaia/pulls/29/commits","review_comments_url":"https://api.github.com/repos/harman-red-square/gaia/pulls/29/comments","review_comment_url":"https://api.github.com/repos/harman-red-square/gaia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/harman-red-square/gaia/issues/29/comments","statuses_url":"https://api.github.com/repos/harman-red-square/gaia/statuses/77aa3196472ac490d6c28803f6b50059b47f5e4b","head":{"label":"ruvsmirnov:homescreen-Davids-comments","ref":"homescreen-Davids-comments","sha":"77aa3196472ac490d6c28803f6b50059b47f5e4b","user":{"login":"ruvsmirnov","id":14997339,"avatar_url":"https://avatars.githubusercontent.com/u/14997339?v=3","gravatar_id":"","url":"https://api.github.com/users/ruvsmirnov","html_url":"https://github.com/ruvsmirnov","followers_url":"https://api.github.com/users/ruvsmirnov/followers","following_url":"https://api.github.com/users/ruvsmirnov/following{/other_user}","gists_url":"https://api.github.com/users/ruvsmirnov/gists{/gist_id}","starred_url":"https://api.github.com/users/ruvsmirnov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruvsmirnov/subscriptions","organizations_url":"https://api.github.com/users/ruvsmirnov/orgs","repos_url":"https://api.github.com/users/ruvsmirnov/repos","events_url":"https://api.github.com/users/ruvsmirnov/events{/privacy}","received_events_url":"https://api.github.com/users/ruvsmirnov/received_events","type":"User","site_admin":false},"repo":{"id":43955023,"name":"gaia","full_name":"ruvsmirnov/gaia","owner":{"login":"ruvsmirnov","id":14997339,"avatar_url":"https://avatars.githubusercontent.com/u/14997339?v=3","gravatar_id":"","url":"https://api.github.com/users/ruvsmirnov","html_url":"https://github.com/ruvsmirnov","followers_url":"https://api.github.com/users/ruvsmirnov/followers","following_url":"https://api.github.com/users/ruvsmirnov/following{/other_user}","gists_url":"https://api.github.com/users/ruvsmirnov/gists{/gist_id}","starred_url":"https://api.github.com/users/ruvsmirnov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruvsmirnov/subscriptions","organizations_url":"https://api.github.com/users/ruvsmirnov/orgs","repos_url":"https://api.github.com/users/ruvsmirnov/repos","events_url":"https://api.github.com/users/ruvsmirnov/events{/privacy}","received_events_url":"https://api.github.com/users/ruvsmirnov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ruvsmirnov/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":true,"url":"https://api.github.com/repos/ruvsmirnov/gaia","forks_url":"https://api.github.com/repos/ruvsmirnov/gaia/forks","keys_url":"https://api.github.com/repos/ruvsmirnov/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ruvsmirnov/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ruvsmirnov/gaia/teams","hooks_url":"https://api.github.com/repos/ruvsmirnov/gaia/hooks","issue_events_url":"https://api.github.com/repos/ruvsmirnov/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/ruvsmirnov/gaia/events","assignees_url":"https://api.github.com/repos/ruvsmirnov/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/ruvsmirnov/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/ruvsmirnov/gaia/tags","blobs_url":"https://api.github.com/repos/ruvsmirnov/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ruvsmirnov/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ruvsmirnov/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/ruvsmirnov/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ruvsmirnov/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/ruvsmirnov/gaia/languages","stargazers_url":"https://api.github.com/repos/ruvsmirnov/gaia/stargazers","contributors_url":"https://api.github.com/repos/ruvsmirnov/gaia/contributors","subscribers_url":"https://api.github.com/repos/ruvsmirnov/gaia/subscribers","subscription_url":"https://api.github.com/repos/ruvsmirnov/gaia/subscription","commits_url":"https://api.github.com/repos/ruvsmirnov/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/ruvsmirnov/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/ruvsmirnov/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/ruvsmirnov/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/ruvsmirnov/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/ruvsmirnov/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ruvsmirnov/gaia/merges","archive_url":"https://api.github.com/repos/ruvsmirnov/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ruvsmirnov/gaia/downloads","issues_url":"https://api.github.com/repos/ruvsmirnov/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/ruvsmirnov/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/ruvsmirnov/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/ruvsmirnov/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ruvsmirnov/gaia/labels{/name}","releases_url":"https://api.github.com/repos/ruvsmirnov/gaia/releases{/id}","created_at":"2015-10-09T12:49:26Z","updated_at":"2015-10-09T12:50:35Z","pushed_at":"2015-11-11T12:10:25Z","git_url":"git://github.com/ruvsmirnov/gaia.git","ssh_url":"git@github.com:ruvsmirnov/gaia.git","clone_url":"https://github.com/ruvsmirnov/gaia.git","svn_url":"https://github.com/ruvsmirnov/gaia","homepage":"https://wiki.mozilla.org/B2G","size":962915,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"v2.2r"}},"base":{"label":"harman-red-square:bug-1210304-homescreen","ref":"bug-1210304-homescreen","sha":"aee8230a66ee93c327d6d10ffcebd6ae6571367a","user":{"login":"harman-red-square","id":14936980,"avatar_url":"https://avatars.githubusercontent.com/u/14936980?v=3","gravatar_id":"","url":"https://api.github.com/users/harman-red-square","html_url":"https://github.com/harman-red-square","followers_url":"https://api.github.com/users/harman-red-square/followers","following_url":"https://api.github.com/users/harman-red-square/following{/other_user}","gists_url":"https://api.github.com/users/harman-red-square/gists{/gist_id}","starred_url":"https://api.github.com/users/harman-red-square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harman-red-square/subscriptions","organizations_url":"https://api.github.com/users/harman-red-square/orgs","repos_url":"https://api.github.com/users/harman-red-square/repos","events_url":"https://api.github.com/users/harman-red-square/events{/privacy}","received_events_url":"https://api.github.com/users/harman-red-square/received_events","type":"Organization","site_admin":false},"repo":{"id":43541057,"name":"gaia","full_name":"harman-red-square/gaia","owner":{"login":"harman-red-square","id":14936980,"avatar_url":"https://avatars.githubusercontent.com/u/14936980?v=3","gravatar_id":"","url":"https://api.github.com/users/harman-red-square","html_url":"https://github.com/harman-red-square","followers_url":"https://api.github.com/users/harman-red-square/followers","following_url":"https://api.github.com/users/harman-red-square/following{/other_user}","gists_url":"https://api.github.com/users/harman-red-square/gists{/gist_id}","starred_url":"https://api.github.com/users/harman-red-square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harman-red-square/subscriptions","organizations_url":"https://api.github.com/users/harman-red-square/orgs","repos_url":"https://api.github.com/users/harman-red-square/repos","events_url":"https://api.github.com/users/harman-red-square/events{/privacy}","received_events_url":"https://api.github.com/users/harman-red-square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/harman-red-square/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":true,"url":"https://api.github.com/repos/harman-red-square/gaia","forks_url":"https://api.github.com/repos/harman-red-square/gaia/forks","keys_url":"https://api.github.com/repos/harman-red-square/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/harman-red-square/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/harman-red-square/gaia/teams","hooks_url":"https://api.github.com/repos/harman-red-square/gaia/hooks","issue_events_url":"https://api.github.com/repos/harman-red-square/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/harman-red-square/gaia/events","assignees_url":"https://api.github.com/repos/harman-red-square/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/harman-red-square/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/harman-red-square/gaia/tags","blobs_url":"https://api.github.com/repos/harman-red-square/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/harman-red-square/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/harman-red-square/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/harman-red-square/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/harman-red-square/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/harman-red-square/gaia/languages","stargazers_url":"https://api.github.com/repos/harman-red-square/gaia/stargazers","contributors_url":"https://api.github.com/repos/harman-red-square/gaia/contributors","subscribers_url":"https://api.github.com/repos/harman-red-square/gaia/subscribers","subscription_url":"https://api.github.com/repos/harman-red-square/gaia/subscription","commits_url":"https://api.github.com/repos/harman-red-square/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/harman-red-square/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/harman-red-square/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/harman-red-square/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/harman-red-square/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/harman-red-square/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/harman-red-square/gaia/merges","archive_url":"https://api.github.com/repos/harman-red-square/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/harman-red-square/gaia/downloads","issues_url":"https://api.github.com/repos/harman-red-square/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/harman-red-square/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/harman-red-square/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/harman-red-square/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/harman-red-square/gaia/labels{/name}","releases_url":"https://api.github.com/repos/harman-red-square/gaia/releases{/id}","created_at":"2015-10-02T07:40:12Z","updated_at":"2015-10-06T11:18:30Z","pushed_at":"2015-11-11T12:10:25Z","git_url":"git://github.com/harman-red-square/gaia.git","ssh_url":"git@github.com:harman-red-square/gaia.git","clone_url":"https://github.com/harman-red-square/gaia.git","svn_url":"https://github.com/harman-red-square/gaia","homepage":"https://wiki.mozilla.org/B2G","size":963919,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":36,"mirror_url":null,"open_issues_count":11,"forks":36,"open_issues":11,"watchers":0,"default_branch":"v2.2r"}},"_links":{"self":{"href":"https://api.github.com/repos/harman-red-square/gaia/pulls/29"},"html":{"href":"https://github.com/harman-red-square/gaia/pull/29"},"issue":{"href":"https://api.github.com/repos/harman-red-square/gaia/issues/29"},"comments":{"href":"https://api.github.com/repos/harman-red-square/gaia/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/harman-red-square/gaia/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/harman-red-square/gaia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/harman-red-square/gaia/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/harman-red-square/gaia/statuses/77aa3196472ac490d6c28803f6b50059b47f5e4b"}}}}