{"action":"created","comment":{"url":"https://api.github.com/repos/songster-project/songster/pulls/comments/22435491","id":22435491,"diff_hunk":"@@ -145,5 +146,16 @@ function VotingService($http, $rootScope, $q, SongFactory, ReceivedVoteFactory,\n         }\n     }\n \n+    this.setVotesongsOfQueue = function(songs) {\n+        _votesongsInQueue = {};\n+        _.each(songs, function(song){\n+            _votesongsInQueue[song._id] = true;\n+        })\n+    }\n+\n+    this.isSongInQueue = function(song) {\n+        return _votesongsInQueue[song._id] !== undefined ? true : false;","path":"src/app/voting/voting-service.js","position":20,"original_position":20,"commit_id":"8521d09146e5efa088b9eb546241dae4f40c673f","original_commit_id":"8521d09146e5efa088b9eb546241dae4f40c673f","user":{"login":"mangei","id":1218033,"avatar_url":"https://avatars.githubusercontent.com/u/1218033?v=3","gravatar_id":"","url":"https://api.github.com/users/mangei","html_url":"https://github.com/mangei","followers_url":"https://api.github.com/users/mangei/followers","following_url":"https://api.github.com/users/mangei/following{/other_user}","gists_url":"https://api.github.com/users/mangei/gists{/gist_id}","starred_url":"https://api.github.com/users/mangei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mangei/subscriptions","organizations_url":"https://api.github.com/users/mangei/orgs","repos_url":"https://api.github.com/users/mangei/repos","events_url":"https://api.github.com/users/mangei/events{/privacy}","received_events_url":"https://api.github.com/users/mangei/received_events","type":"User","site_admin":false},"body":"info: this may be a potential bug. if you set `_votesongsInQueue[song._id]` to `true` (for a reason), then this function will return `false` instead of `true`.\r\nIt would be better to write:\r\n`return _votesongsInQueue[song._id] !== undefined && _votesongsInQueue[song._id] !== false ? true : false;` \r\nor\r\n`return _votesongsInQueue[song._id] === true ? true : false;` \r\nor\r\n`return !!_votesongsInQueue[song._id];`\r\n_(not tested)_","created_at":"2015-01-03T23:47:50Z","updated_at":"2015-01-03T23:47:50Z","html_url":"https://github.com/songster-project/songster/pull/75#discussion_r22435491","pull_request_url":"https://api.github.com/repos/songster-project/songster/pulls/75","_links":{"self":{"href":"https://api.github.com/repos/songster-project/songster/pulls/comments/22435491"},"html":{"href":"https://github.com/songster-project/songster/pull/75#discussion_r22435491"},"pull_request":{"href":"https://api.github.com/repos/songster-project/songster/pulls/75"}}},"pull_request":{"url":"https://api.github.com/repos/songster-project/songster/pulls/75","id":26783324,"html_url":"https://github.com/songster-project/songster/pull/75","diff_url":"https://github.com/songster-project/songster/pull/75.diff","patch_url":"https://github.com/songster-project/songster/pull/75.patch","issue_url":"https://api.github.com/repos/songster-project/songster/issues/75","number":75,"state":"open","locked":false,"title":"Feature/display vote is in queue","user":{"login":"lfichtinger","id":2481783,"avatar_url":"https://avatars.githubusercontent.com/u/2481783?v=3","gravatar_id":"","url":"https://api.github.com/users/lfichtinger","html_url":"https://github.com/lfichtinger","followers_url":"https://api.github.com/users/lfichtinger/followers","following_url":"https://api.github.com/users/lfichtinger/following{/other_user}","gists_url":"https://api.github.com/users/lfichtinger/gists{/gist_id}","starred_url":"https://api.github.com/users/lfichtinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfichtinger/subscriptions","organizations_url":"https://api.github.com/users/lfichtinger/orgs","repos_url":"https://api.github.com/users/lfichtinger/repos","events_url":"https://api.github.com/users/lfichtinger/events{/privacy}","received_events_url":"https://api.github.com/users/lfichtinger/received_events","type":"User","site_admin":false},"body":"![show_votesong_is_in_queue](https://cloud.githubusercontent.com/assets/2481783/5602673/7bfd181e-935e-11e4-9240-b726bf92c3a0.PNG)\r\n\r\n* shows a clock symbol at the vote in vote view if song belongs to the next songs according to the ws-event music_changed as in playlist\r\n\r\n* this could also be added to the songs in the suggest views - but first the mobile ui should be merged before i would do that","created_at":"2015-01-03T14:39:41Z","updated_at":"2015-01-03T23:47:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ee6dc2f7d79c0d70d7ba018fe10c5f9f625f252","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/songster-project/songster/pulls/75/commits","review_comments_url":"https://api.github.com/repos/songster-project/songster/pulls/75/comments","review_comment_url":"https://api.github.com/repos/songster-project/songster/pulls/comments/{number}","comments_url":"https://api.github.com/repos/songster-project/songster/issues/75/comments","statuses_url":"https://api.github.com/repos/songster-project/songster/statuses/8521d09146e5efa088b9eb546241dae4f40c673f","head":{"label":"songster-project:feature/display_vote_is_in_queue","ref":"feature/display_vote_is_in_queue","sha":"8521d09146e5efa088b9eb546241dae4f40c673f","user":{"login":"songster-project","id":9221751,"avatar_url":"https://avatars.githubusercontent.com/u/9221751?v=3","gravatar_id":"","url":"https://api.github.com/users/songster-project","html_url":"https://github.com/songster-project","followers_url":"https://api.github.com/users/songster-project/followers","following_url":"https://api.github.com/users/songster-project/following{/other_user}","gists_url":"https://api.github.com/users/songster-project/gists{/gist_id}","starred_url":"https://api.github.com/users/songster-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/songster-project/subscriptions","organizations_url":"https://api.github.com/users/songster-project/orgs","repos_url":"https://api.github.com/users/songster-project/repos","events_url":"https://api.github.com/users/songster-project/events{/privacy}","received_events_url":"https://api.github.com/users/songster-project/received_events","type":"Organization","site_admin":false},"repo":{"id":25228241,"name":"songster","full_name":"songster-project/songster","owner":{"login":"songster-project","id":9221751,"avatar_url":"https://avatars.githubusercontent.com/u/9221751?v=3","gravatar_id":"","url":"https://api.github.com/users/songster-project","html_url":"https://github.com/songster-project","followers_url":"https://api.github.com/users/songster-project/followers","following_url":"https://api.github.com/users/songster-project/following{/other_user}","gists_url":"https://api.github.com/users/songster-project/gists{/gist_id}","starred_url":"https://api.github.com/users/songster-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/songster-project/subscriptions","organizations_url":"https://api.github.com/users/songster-project/orgs","repos_url":"https://api.github.com/users/songster-project/repos","events_url":"https://api.github.com/users/songster-project/events{/privacy}","received_events_url":"https://api.github.com/users/songster-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/songster-project/songster","description":"You make the Party!","fork":false,"url":"https://api.github.com/repos/songster-project/songster","forks_url":"https://api.github.com/repos/songster-project/songster/forks","keys_url":"https://api.github.com/repos/songster-project/songster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/songster-project/songster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/songster-project/songster/teams","hooks_url":"https://api.github.com/repos/songster-project/songster/hooks","issue_events_url":"https://api.github.com/repos/songster-project/songster/issues/events{/number}","events_url":"https://api.github.com/repos/songster-project/songster/events","assignees_url":"https://api.github.com/repos/songster-project/songster/assignees{/user}","branches_url":"https://api.github.com/repos/songster-project/songster/branches{/branch}","tags_url":"https://api.github.com/repos/songster-project/songster/tags","blobs_url":"https://api.github.com/repos/songster-project/songster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/songster-project/songster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/songster-project/songster/git/refs{/sha}","trees_url":"https://api.github.com/repos/songster-project/songster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/songster-project/songster/statuses/{sha}","languages_url":"https://api.github.com/repos/songster-project/songster/languages","stargazers_url":"https://api.github.com/repos/songster-project/songster/stargazers","contributors_url":"https://api.github.com/repos/songster-project/songster/contributors","subscribers_url":"https://api.github.com/repos/songster-project/songster/subscribers","subscription_url":"https://api.github.com/repos/songster-project/songster/subscription","commits_url":"https://api.github.com/repos/songster-project/songster/commits{/sha}","git_commits_url":"https://api.github.com/repos/songster-project/songster/git/commits{/sha}","comments_url":"https://api.github.com/repos/songster-project/songster/comments{/number}","issue_comment_url":"https://api.github.com/repos/songster-project/songster/issues/comments/{number}","contents_url":"https://api.github.com/repos/songster-project/songster/contents/{+path}","compare_url":"https://api.github.com/repos/songster-project/songster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/songster-project/songster/merges","archive_url":"https://api.github.com/repos/songster-project/songster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/songster-project/songster/downloads","issues_url":"https://api.github.com/repos/songster-project/songster/issues{/number}","pulls_url":"https://api.github.com/repos/songster-project/songster/pulls{/number}","milestones_url":"https://api.github.com/repos/songster-project/songster/milestones{/number}","notifications_url":"https://api.github.com/repos/songster-project/songster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/songster-project/songster/labels{/name}","releases_url":"https://api.github.com/repos/songster-project/songster/releases{/id}","created_at":"2014-10-14T21:52:10Z","updated_at":"2015-01-03T17:17:07Z","pushed_at":"2015-01-03T23:36:33Z","git_url":"git://github.com/songster-project/songster.git","ssh_url":"git@github.com:songster-project/songster.git","clone_url":"https://github.com/songster-project/songster.git","svn_url":"https://github.com/songster-project/songster","homepage":"","size":6356,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":3,"default_branch":"master"}},"base":{"label":"songster-project:master","ref":"master","sha":"41f34d112a723a815ea13a24402b2bb6d3889a40","user":{"login":"songster-project","id":9221751,"avatar_url":"https://avatars.githubusercontent.com/u/9221751?v=3","gravatar_id":"","url":"https://api.github.com/users/songster-project","html_url":"https://github.com/songster-project","followers_url":"https://api.github.com/users/songster-project/followers","following_url":"https://api.github.com/users/songster-project/following{/other_user}","gists_url":"https://api.github.com/users/songster-project/gists{/gist_id}","starred_url":"https://api.github.com/users/songster-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/songster-project/subscriptions","organizations_url":"https://api.github.com/users/songster-project/orgs","repos_url":"https://api.github.com/users/songster-project/repos","events_url":"https://api.github.com/users/songster-project/events{/privacy}","received_events_url":"https://api.github.com/users/songster-project/received_events","type":"Organization","site_admin":false},"repo":{"id":25228241,"name":"songster","full_name":"songster-project/songster","owner":{"login":"songster-project","id":9221751,"avatar_url":"https://avatars.githubusercontent.com/u/9221751?v=3","gravatar_id":"","url":"https://api.github.com/users/songster-project","html_url":"https://github.com/songster-project","followers_url":"https://api.github.com/users/songster-project/followers","following_url":"https://api.github.com/users/songster-project/following{/other_user}","gists_url":"https://api.github.com/users/songster-project/gists{/gist_id}","starred_url":"https://api.github.com/users/songster-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/songster-project/subscriptions","organizations_url":"https://api.github.com/users/songster-project/orgs","repos_url":"https://api.github.com/users/songster-project/repos","events_url":"https://api.github.com/users/songster-project/events{/privacy}","received_events_url":"https://api.github.com/users/songster-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/songster-project/songster","description":"You make the Party!","fork":false,"url":"https://api.github.com/repos/songster-project/songster","forks_url":"https://api.github.com/repos/songster-project/songster/forks","keys_url":"https://api.github.com/repos/songster-project/songster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/songster-project/songster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/songster-project/songster/teams","hooks_url":"https://api.github.com/repos/songster-project/songster/hooks","issue_events_url":"https://api.github.com/repos/songster-project/songster/issues/events{/number}","events_url":"https://api.github.com/repos/songster-project/songster/events","assignees_url":"https://api.github.com/repos/songster-project/songster/assignees{/user}","branches_url":"https://api.github.com/repos/songster-project/songster/branches{/branch}","tags_url":"https://api.github.com/repos/songster-project/songster/tags","blobs_url":"https://api.github.com/repos/songster-project/songster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/songster-project/songster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/songster-project/songster/git/refs{/sha}","trees_url":"https://api.github.com/repos/songster-project/songster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/songster-project/songster/statuses/{sha}","languages_url":"https://api.github.com/repos/songster-project/songster/languages","stargazers_url":"https://api.github.com/repos/songster-project/songster/stargazers","contributors_url":"https://api.github.com/repos/songster-project/songster/contributors","subscribers_url":"https://api.github.com/repos/songster-project/songster/subscribers","subscription_url":"https://api.github.com/repos/songster-project/songster/subscription","commits_url":"https://api.github.com/repos/songster-project/songster/commits{/sha}","git_commits_url":"https://api.github.com/repos/songster-project/songster/git/commits{/sha}","comments_url":"https://api.github.com/repos/songster-project/songster/comments{/number}","issue_comment_url":"https://api.github.com/repos/songster-project/songster/issues/comments/{number}","contents_url":"https://api.github.com/repos/songster-project/songster/contents/{+path}","compare_url":"https://api.github.com/repos/songster-project/songster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/songster-project/songster/merges","archive_url":"https://api.github.com/repos/songster-project/songster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/songster-project/songster/downloads","issues_url":"https://api.github.com/repos/songster-project/songster/issues{/number}","pulls_url":"https://api.github.com/repos/songster-project/songster/pulls{/number}","milestones_url":"https://api.github.com/repos/songster-project/songster/milestones{/number}","notifications_url":"https://api.github.com/repos/songster-project/songster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/songster-project/songster/labels{/name}","releases_url":"https://api.github.com/repos/songster-project/songster/releases{/id}","created_at":"2014-10-14T21:52:10Z","updated_at":"2015-01-03T17:17:07Z","pushed_at":"2015-01-03T23:36:33Z","git_url":"git://github.com/songster-project/songster.git","ssh_url":"git@github.com:songster-project/songster.git","clone_url":"https://github.com/songster-project/songster.git","svn_url":"https://github.com/songster-project/songster","homepage":"","size":6356,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/songster-project/songster/pulls/75"},"html":{"href":"https://github.com/songster-project/songster/pull/75"},"issue":{"href":"https://api.github.com/repos/songster-project/songster/issues/75"},"comments":{"href":"https://api.github.com/repos/songster-project/songster/issues/75/comments"},"review_comments":{"href":"https://api.github.com/repos/songster-project/songster/pulls/75/comments"},"review_comment":{"href":"https://api.github.com/repos/songster-project/songster/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/songster-project/songster/pulls/75/commits"},"statuses":{"href":"https://api.github.com/repos/songster-project/songster/statuses/8521d09146e5efa088b9eb546241dae4f40c673f"}}}}