{"action":"created","comment":{"url":"https://api.github.com/repos/Claudio5/SDP/pulls/comments/240801088","pull_request_review_id":183911772,"id":240801088,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDgwMTA4OA==","diff_hunk":"@@ -43,18 +49,23 @@ private RankingUtils() {\n      */\n     public static Integer[] generatePositionsFromRanking(Integer[] ranking) {\n         Integer[] positions = new Integer[ranking.length];\n-        positions[0] = 1;\n+\n+        positions[0] = ranking[0] >= 0 ? 1 : 5;","path":"app/src/main/java/ch/epfl/sweng/SDP/utils/RankingUtils.java","position":36,"original_position":36,"commit_id":"37a00b9b3478444c992cf514e32ad0d17af690ad","original_commit_id":"37a00b9b3478444c992cf514e32ad0d17af690ad","user":{"login":"Gondolav","id":22381029,"node_id":"MDQ6VXNlcjIyMzgxMDI5","avatar_url":"https://avatars1.githubusercontent.com/u/22381029?v=4","gravatar_id":"","url":"https://api.github.com/users/Gondolav","html_url":"https://github.com/Gondolav","followers_url":"https://api.github.com/users/Gondolav/followers","following_url":"https://api.github.com/users/Gondolav/following{/other_user}","gists_url":"https://api.github.com/users/Gondolav/gists{/gist_id}","starred_url":"https://api.github.com/users/Gondolav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gondolav/subscriptions","organizations_url":"https://api.github.com/users/Gondolav/orgs","repos_url":"https://api.github.com/users/Gondolav/repos","events_url":"https://api.github.com/users/Gondolav/events{/privacy}","received_events_url":"https://api.github.com/users/Gondolav/received_events","type":"User","site_admin":false},"body":"The magic numbers should be replaced by constants as in the other method","created_at":"2018-12-11T21:40:05Z","updated_at":"2018-12-11T21:53:57Z","html_url":"https://github.com/Claudio5/SDP/pull/188#discussion_r240801088","pull_request_url":"https://api.github.com/repos/Claudio5/SDP/pulls/188","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Claudio5/SDP/pulls/comments/240801088"},"html":{"href":"https://github.com/Claudio5/SDP/pull/188#discussion_r240801088"},"pull_request":{"href":"https://api.github.com/repos/Claudio5/SDP/pulls/188"}}},"pull_request":{"url":"https://api.github.com/repos/Claudio5/SDP/pulls/188","id":237121942,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3MTIxOTQy","html_url":"https://github.com/Claudio5/SDP/pull/188","diff_url":"https://github.com/Claudio5/SDP/pull/188.diff","patch_url":"https://github.com/Claudio5/SDP/pull/188.patch","issue_url":"https://api.github.com/repos/Claudio5/SDP/issues/188","number":188,"state":"open","locked":false,"title":"User disconnected","user":{"login":"Claudio5","id":29493317,"node_id":"MDQ6VXNlcjI5NDkzMzE3","avatar_url":"https://avatars0.githubusercontent.com/u/29493317?v=4","gravatar_id":"","url":"https://api.github.com/users/Claudio5","html_url":"https://github.com/Claudio5","followers_url":"https://api.github.com/users/Claudio5/followers","following_url":"https://api.github.com/users/Claudio5/following{/other_user}","gists_url":"https://api.github.com/users/Claudio5/gists{/gist_id}","starred_url":"https://api.github.com/users/Claudio5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Claudio5/subscriptions","organizations_url":"https://api.github.com/users/Claudio5/orgs","repos_url":"https://api.github.com/users/Claudio5/repos","events_url":"https://api.github.com/users/Claudio5/events{/privacy}","received_events_url":"https://api.github.com/users/Claudio5/received_events","type":"User","site_admin":false},"body":"This PR implements:\r\n- When a user loses connection in any state of the online game (i.e. WaitingPageActivity, DrawingOnline(Activities), VotingPageActivity and RankingFragment) a popUp shows up and redirects user to loginPage.\r\n\r\n- A user that leaves or disconnects will automatically finish in 5th position and thus losing automatically trophies.\r\n\r\n- If users leave before VotingActivity a disconnected message will be displayed in VotingActivity and in RankingFrangment. (If user leaves in voting activity the disconnected will only appear in RankingFragment). It is not possible to vote for disconnected players.\r\n\r\n- Disconnected users or users that leave before the game ends will have their stars/trophies/leagues updated by the server.\r\n\r\nN.B. : For now quitting the app during a game is considered as leaving the game.","created_at":"2018-12-09T10:28:39Z","updated_at":"2018-12-11T21:53:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3169095fae60287ac8a892a209244e3b535aa555","assignee":{"login":"Claudio5","id":29493317,"node_id":"MDQ6VXNlcjI5NDkzMzE3","avatar_url":"https://avatars0.githubusercontent.com/u/29493317?v=4","gravatar_id":"","url":"https://api.github.com/users/Claudio5","html_url":"https://github.com/Claudio5","followers_url":"https://api.github.com/users/Claudio5/followers","following_url":"https://api.github.com/users/Claudio5/following{/other_user}","gists_url":"https://api.github.com/users/Claudio5/gists{/gist_id}","starred_url":"https://api.github.com/users/Claudio5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Claudio5/subscriptions","organizations_url":"https://api.github.com/users/Claudio5/orgs","repos_url":"https://api.github.com/users/Claudio5/repos","events_url":"https://api.github.com/users/Claudio5/events{/privacy}","received_events_url":"https://api.github.com/users/Claudio5/received_events","type":"User","site_admin":false},"assignees":[{"login":"Claudio5","id":29493317,"node_id":"MDQ6VXNlcjI5NDkzMzE3","avatar_url":"https://avatars0.githubusercontent.com/u/29493317?v=4","gravatar_id":"","url":"https://api.github.com/users/Claudio5","html_url":"https://github.com/Claudio5","followers_url":"https://api.github.com/users/Claudio5/followers","following_url":"https://api.github.com/users/Claudio5/following{/other_user}","gists_url":"https://api.github.com/users/Claudio5/gists{/gist_id}","starred_url":"https://api.github.com/users/Claudio5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Claudio5/subscriptions","organizations_url":"https://api.github.com/users/Claudio5/orgs","repos_url":"https://api.github.com/users/Claudio5/repos","events_url":"https://api.github.com/users/Claudio5/events{/privacy}","received_events_url":"https://api.github.com/users/Claudio5/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"FredrikBixo","id":7298189,"node_id":"MDQ6VXNlcjcyOTgxODk=","avatar_url":"https://avatars3.githubusercontent.com/u/7298189?v=4","gravatar_id":"","url":"https://api.github.com/users/FredrikBixo","html_url":"https://github.com/FredrikBixo","followers_url":"https://api.github.com/users/FredrikBixo/followers","following_url":"https://api.github.com/users/FredrikBixo/following{/other_user}","gists_url":"https://api.github.com/users/FredrikBixo/gists{/gist_id}","starred_url":"https://api.github.com/users/FredrikBixo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FredrikBixo/subscriptions","organizations_url":"https://api.github.com/users/FredrikBixo/orgs","repos_url":"https://api.github.com/users/FredrikBixo/repos","events_url":"https://api.github.com/users/FredrikBixo/events{/privacy}","received_events_url":"https://api.github.com/users/FredrikBixo/received_events","type":"User","site_admin":false},{"login":"rbischof","id":36681283,"node_id":"MDQ6VXNlcjM2NjgxMjgz","avatar_url":"https://avatars2.githubusercontent.com/u/36681283?v=4","gravatar_id":"","url":"https://api.github.com/users/rbischof","html_url":"https://github.com/rbischof","followers_url":"https://api.github.com/users/rbischof/followers","following_url":"https://api.github.com/users/rbischof/following{/other_user}","gists_url":"https://api.github.com/users/rbischof/gists{/gist_id}","starred_url":"https://api.github.com/users/rbischof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbischof/subscriptions","organizations_url":"https://api.github.com/users/rbischof/orgs","repos_url":"https://api.github.com/users/rbischof/repos","events_url":"https://api.github.com/users/rbischof/events{/privacy}","received_events_url":"https://api.github.com/users/rbischof/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Claudio5/SDP/pulls/188/commits","review_comments_url":"https://api.github.com/repos/Claudio5/SDP/pulls/188/comments","review_comment_url":"https://api.github.com/repos/Claudio5/SDP/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Claudio5/SDP/issues/188/comments","statuses_url":"https://api.github.com/repos/Claudio5/SDP/statuses/37a00b9b3478444c992cf514e32ad0d17af690ad","head":{"label":"Claudio5:user-disconnected","ref":"user-disconnected","sha":"37a00b9b3478444c992cf514e32ad0d17af690ad","user":{"login":"Claudio5","id":29493317,"node_id":"MDQ6VXNlcjI5NDkzMzE3","avatar_url":"https://avatars0.githubusercontent.com/u/29493317?v=4","gravatar_id":"","url":"https://api.github.com/users/Claudio5","html_url":"https://github.com/Claudio5","followers_url":"https://api.github.com/users/Claudio5/followers","following_url":"https://api.github.com/users/Claudio5/following{/other_user}","gists_url":"https://api.github.com/users/Claudio5/gists{/gist_id}","starred_url":"https://api.github.com/users/Claudio5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Claudio5/subscriptions","organizations_url":"https://api.github.com/users/Claudio5/orgs","repos_url":"https://api.github.com/users/Claudio5/repos","events_url":"https://api.github.com/users/Claudio5/events{/privacy}","received_events_url":"https://api.github.com/users/Claudio5/received_events","type":"User","site_admin":false},"repo":{"id":150407753,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA0MDc3NTM=","name":"SDP","full_name":"Claudio5/SDP","private":false,"owner":{"login":"Claudio5","id":29493317,"node_id":"MDQ6VXNlcjI5NDkzMzE3","avatar_url":"https://avatars0.githubusercontent.com/u/29493317?v=4","gravatar_id":"","url":"https://api.github.com/users/Claudio5","html_url":"https://github.com/Claudio5","followers_url":"https://api.github.com/users/Claudio5/followers","following_url":"https://api.github.com/users/Claudio5/following{/other_user}","gists_url":"https://api.github.com/users/Claudio5/gists{/gist_id}","starred_url":"https://api.github.com/users/Claudio5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Claudio5/subscriptions","organizations_url":"https://api.github.com/users/Claudio5/orgs","repos_url":"https://api.github.com/users/Claudio5/repos","events_url":"https://api.github.com/users/Claudio5/events{/privacy}","received_events_url":"https://api.github.com/users/Claudio5/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Claudio5/SDP","description":"Android development project ","fork":false,"url":"https://api.github.com/repos/Claudio5/SDP","forks_url":"https://api.github.com/repos/Claudio5/SDP/forks","keys_url":"https://api.github.com/repos/Claudio5/SDP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Claudio5/SDP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Claudio5/SDP/teams","hooks_url":"https://api.github.com/repos/Claudio5/SDP/hooks","issue_events_url":"https://api.github.com/repos/Claudio5/SDP/issues/events{/number}","events_url":"https://api.github.com/repos/Claudio5/SDP/events","assignees_url":"https://api.github.com/repos/Claudio5/SDP/assignees{/user}","branches_url":"https://api.github.com/repos/Claudio5/SDP/branches{/branch}","tags_url":"https://api.github.com/repos/Claudio5/SDP/tags","blobs_url":"https://api.github.com/repos/Claudio5/SDP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Claudio5/SDP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Claudio5/SDP/git/refs{/sha}","trees_url":"https://api.github.com/repos/Claudio5/SDP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Claudio5/SDP/statuses/{sha}","languages_url":"https://api.github.com/repos/Claudio5/SDP/languages","stargazers_url":"https://api.github.com/repos/Claudio5/SDP/stargazers","contributors_url":"https://api.github.com/repos/Claudio5/SDP/contributors","subscribers_url":"https://api.github.com/repos/Claudio5/SDP/subscribers","subscription_url":"https://api.github.com/repos/Claudio5/SDP/subscription","commits_url":"https://api.github.com/repos/Claudio5/SDP/commits{/sha}","git_commits_url":"https://api.github.com/repos/Claudio5/SDP/git/commits{/sha}","comments_url":"https://api.github.com/repos/Claudio5/SDP/comments{/number}","issue_comment_url":"https://api.github.com/repos/Claudio5/SDP/issues/comments{/number}","contents_url":"https://api.github.com/repos/Claudio5/SDP/contents/{+path}","compare_url":"https://api.github.com/repos/Claudio5/SDP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Claudio5/SDP/merges","archive_url":"https://api.github.com/repos/Claudio5/SDP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Claudio5/SDP/downloads","issues_url":"https://api.github.com/repos/Claudio5/SDP/issues{/number}","pulls_url":"https://api.github.com/repos/Claudio5/SDP/pulls{/number}","milestones_url":"https://api.github.com/repos/Claudio5/SDP/milestones{/number}","notifications_url":"https://api.github.com/repos/Claudio5/SDP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Claudio5/SDP/labels{/name}","releases_url":"https://api.github.com/repos/Claudio5/SDP/releases{/id}","deployments_url":"https://api.github.com/repos/Claudio5/SDP/deployments","created_at":"2018-09-26T10:14:36Z","updated_at":"2018-12-11T20:52:08Z","pushed_at":"2018-12-11T21:21:38Z","git_url":"git://github.com/Claudio5/SDP.git","ssh_url":"git@github.com:Claudio5/SDP.git","clone_url":"https://github.com/Claudio5/SDP.git","svn_url":"https://github.com/Claudio5/SDP","homepage":"","size":34766,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":28,"license":null,"forks":1,"open_issues":28,"watchers":4,"default_branch":"master"}},"base":{"label":"Claudio5:master","ref":"master","sha":"c5059ba35f787bfd8e45dd0fb7d97d4557238819","user":{"login":"Claudio5","id":29493317,"node_id":"MDQ6VXNlcjI5NDkzMzE3","avatar_url":"https://avatars0.githubusercontent.com/u/29493317?v=4","gravatar_id":"","url":"https://api.github.com/users/Claudio5","html_url":"https://github.com/Claudio5","followers_url":"https://api.github.com/users/Claudio5/followers","following_url":"https://api.github.com/users/Claudio5/following{/other_user}","gists_url":"https://api.github.com/users/Claudio5/gists{/gist_id}","starred_url":"https://api.github.com/users/Claudio5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Claudio5/subscriptions","organizations_url":"https://api.github.com/users/Claudio5/orgs","repos_url":"https://api.github.com/users/Claudio5/repos","events_url":"https://api.github.com/users/Claudio5/events{/privacy}","received_events_url":"https://api.github.com/users/Claudio5/received_events","type":"User","site_admin":false},"repo":{"id":150407753,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA0MDc3NTM=","name":"SDP","full_name":"Claudio5/SDP","private":false,"owner":{"login":"Claudio5","id":29493317,"node_id":"MDQ6VXNlcjI5NDkzMzE3","avatar_url":"https://avatars0.githubusercontent.com/u/29493317?v=4","gravatar_id":"","url":"https://api.github.com/users/Claudio5","html_url":"https://github.com/Claudio5","followers_url":"https://api.github.com/users/Claudio5/followers","following_url":"https://api.github.com/users/Claudio5/following{/other_user}","gists_url":"https://api.github.com/users/Claudio5/gists{/gist_id}","starred_url":"https://api.github.com/users/Claudio5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Claudio5/subscriptions","organizations_url":"https://api.github.com/users/Claudio5/orgs","repos_url":"https://api.github.com/users/Claudio5/repos","events_url":"https://api.github.com/users/Claudio5/events{/privacy}","received_events_url":"https://api.github.com/users/Claudio5/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Claudio5/SDP","description":"Android development project ","fork":false,"url":"https://api.github.com/repos/Claudio5/SDP","forks_url":"https://api.github.com/repos/Claudio5/SDP/forks","keys_url":"https://api.github.com/repos/Claudio5/SDP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Claudio5/SDP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Claudio5/SDP/teams","hooks_url":"https://api.github.com/repos/Claudio5/SDP/hooks","issue_events_url":"https://api.github.com/repos/Claudio5/SDP/issues/events{/number}","events_url":"https://api.github.com/repos/Claudio5/SDP/events","assignees_url":"https://api.github.com/repos/Claudio5/SDP/assignees{/user}","branches_url":"https://api.github.com/repos/Claudio5/SDP/branches{/branch}","tags_url":"https://api.github.com/repos/Claudio5/SDP/tags","blobs_url":"https://api.github.com/repos/Claudio5/SDP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Claudio5/SDP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Claudio5/SDP/git/refs{/sha}","trees_url":"https://api.github.com/repos/Claudio5/SDP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Claudio5/SDP/statuses/{sha}","languages_url":"https://api.github.com/repos/Claudio5/SDP/languages","stargazers_url":"https://api.github.com/repos/Claudio5/SDP/stargazers","contributors_url":"https://api.github.com/repos/Claudio5/SDP/contributors","subscribers_url":"https://api.github.com/repos/Claudio5/SDP/subscribers","subscription_url":"https://api.github.com/repos/Claudio5/SDP/subscription","commits_url":"https://api.github.com/repos/Claudio5/SDP/commits{/sha}","git_commits_url":"https://api.github.com/repos/Claudio5/SDP/git/commits{/sha}","comments_url":"https://api.github.com/repos/Claudio5/SDP/comments{/number}","issue_comment_url":"https://api.github.com/repos/Claudio5/SDP/issues/comments{/number}","contents_url":"https://api.github.com/repos/Claudio5/SDP/contents/{+path}","compare_url":"https://api.github.com/repos/Claudio5/SDP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Claudio5/SDP/merges","archive_url":"https://api.github.com/repos/Claudio5/SDP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Claudio5/SDP/downloads","issues_url":"https://api.github.com/repos/Claudio5/SDP/issues{/number}","pulls_url":"https://api.github.com/repos/Claudio5/SDP/pulls{/number}","milestones_url":"https://api.github.com/repos/Claudio5/SDP/milestones{/number}","notifications_url":"https://api.github.com/repos/Claudio5/SDP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Claudio5/SDP/labels{/name}","releases_url":"https://api.github.com/repos/Claudio5/SDP/releases{/id}","deployments_url":"https://api.github.com/repos/Claudio5/SDP/deployments","created_at":"2018-09-26T10:14:36Z","updated_at":"2018-12-11T20:52:08Z","pushed_at":"2018-12-11T21:21:38Z","git_url":"git://github.com/Claudio5/SDP.git","ssh_url":"git@github.com:Claudio5/SDP.git","clone_url":"https://github.com/Claudio5/SDP.git","svn_url":"https://github.com/Claudio5/SDP","homepage":"","size":34766,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":28,"license":null,"forks":1,"open_issues":28,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Claudio5/SDP/pulls/188"},"html":{"href":"https://github.com/Claudio5/SDP/pull/188"},"issue":{"href":"https://api.github.com/repos/Claudio5/SDP/issues/188"},"comments":{"href":"https://api.github.com/repos/Claudio5/SDP/issues/188/comments"},"review_comments":{"href":"https://api.github.com/repos/Claudio5/SDP/pulls/188/comments"},"review_comment":{"href":"https://api.github.com/repos/Claudio5/SDP/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Claudio5/SDP/pulls/188/commits"},"statuses":{"href":"https://api.github.com/repos/Claudio5/SDP/statuses/37a00b9b3478444c992cf514e32ad0d17af690ad"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Gondolav"}}