{"action":"created","comment":{"url":"https://api.github.com/repos/ldev6/wtm/pulls/comments/173687467","pull_request_review_id":102915427,"id":173687467,"diff_hunk":"@@ -143,32 +134,57 @@ public String getStartDate(String stringDate, String startTime, String endTime,\n             long timeEnd = dateEnd.getTime();\n             Log.v(\"Date\", \"Date = \" + dateStart);\n \n-            double difference = Math.floor((timeEnd - timeStart) / totalNumber);\n-            Log.v(\"Date\", \"difference = \" + difference);\n+            long difference = (timeEnd - timeStart) / totalNumber;\n+            Log.v(\"Date\", \"difference = \" + new Date(difference));\n \n-            long newDateTime = (long) (timeStart + difference * number );\n+            long newStartTime = timeStart + difference * number;\n+            long newEndTime = timeStart + difference * (number + 1);\n \n-            Date result = new Date(newDateTime);\n-            int minutes = result.getMinutes();\n-            minutes = minutes > 9 ? minutes : '0' + minutes;\n-            Log.v(\"result\", \" result = \" + result.getHours() + \":\" + minutes);\n-            return result.getHours() + \":\" + minutes;\n+            return getTime(newStartTime) + \" - \" + getTime(newEndTime);\n         } catch (ParseException e) {\n-            e.printStackTrace();\n+            Log.e(TAG, \"ParseException\", e);\n         }\n         return startTime + \" \" + endTime;\n     }\n \n+    protected String getTime(long timeInMillis) {\n+        Calendar calendar = Calendar.getInstance();\n+        calendar.setTimeInMillis(timeInMillis);\n+        StringBuilder builder = new StringBuilder();\n+        builder.append(calendar.get(Calendar.HOUR_OF_DAY));\n+        builder.append(\":\");\n+        int minutes = calendar.get(Calendar.MINUTE);\n+        if (minutes <= 9) {\n+            builder.append(\"0\");\n+        }\n+        builder.append(minutes);\n+        return builder.toString();\n+    }\n+\n     @Override\n     public void retryOnProblem() {\n         if (!isAdded()) {\n             return;\n         }\n-        FirebaseData.INSTANCE.getSessions(getActivity(), requestListenerSession);\n \n         FirebaseData.INSTANCE.getMyShedule(getActivity(), requestListenerMySchedule);\n+        FirebaseData.INSTANCE.getSessions(getActivity(), requestListenerSession);\n+        FirebaseData.INSTANCE.getMyRatings(getActivity(), requestListenerRatings);\n     }\n \n+    private FirebaseData.RequestListener<HashMap<String, Long>> requestListenerRatings =\n+        new FirebaseData.RequestListener<HashMap<String, Long>>() {\n+            @Override\n+            public void onDataChange(@org.jetbrains.annotations.Nullable HashMap<String, Long> data) {\n+                Log.d(TAG, \"Received ratings:\" + data);","path":"app/src/main/java/com/montreal/wtm/ui/fragment/ProgramFragment.java","position":208,"original_position":208,"commit_id":"ee02d08d4f82cb064642e4d204ec9f221792fa00","original_commit_id":"ee02d08d4f82cb064642e4d204ec9f221792fa00","user":{"login":"DelsFdez","id":36465633,"avatar_url":"https://avatars3.githubusercontent.com/u/36465633?v=4","gravatar_id":"","url":"https://api.github.com/users/DelsFdez","html_url":"https://github.com/DelsFdez","followers_url":"https://api.github.com/users/DelsFdez/followers","following_url":"https://api.github.com/users/DelsFdez/following{/other_user}","gists_url":"https://api.github.com/users/DelsFdez/gists{/gist_id}","starred_url":"https://api.github.com/users/DelsFdez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DelsFdez/subscriptions","organizations_url":"https://api.github.com/users/DelsFdez/orgs","repos_url":"https://api.github.com/users/DelsFdez/repos","events_url":"https://api.github.com/users/DelsFdez/events{/privacy}","received_events_url":"https://api.github.com/users/DelsFdez/received_events","type":"User","site_admin":false},"body":"Won't remove the logs, they should be omitted with proguard","created_at":"2018-03-12T03:14:35Z","updated_at":"2018-03-12T03:14:35Z","html_url":"https://github.com/ldev6/wtm/pull/1#discussion_r173687467","pull_request_url":"https://api.github.com/repos/ldev6/wtm/pulls/1","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ldev6/wtm/pulls/comments/173687467"},"html":{"href":"https://github.com/ldev6/wtm/pull/1#discussion_r173687467"},"pull_request":{"href":"https://api.github.com/repos/ldev6/wtm/pulls/1"}},"in_reply_to_id":173683427},"pull_request":{"url":"https://api.github.com/repos/ldev6/wtm/pulls/1","id":174256364,"html_url":"https://github.com/ldev6/wtm/pull/1","diff_url":"https://github.com/ldev6/wtm/pull/1.diff","patch_url":"https://github.com/ldev6/wtm/pull/1.patch","issue_url":"https://api.github.com/repos/ldev6/wtm/issues/1","number":1,"state":"open","locked":false,"title":"Clean up 18","user":{"login":"DelsFdez","id":36465633,"avatar_url":"https://avatars3.githubusercontent.com/u/36465633?v=4","gravatar_id":"","url":"https://api.github.com/users/DelsFdez","html_url":"https://github.com/DelsFdez","followers_url":"https://api.github.com/users/DelsFdez/followers","following_url":"https://api.github.com/users/DelsFdez/following{/other_user}","gists_url":"https://api.github.com/users/DelsFdez/gists{/gist_id}","starred_url":"https://api.github.com/users/DelsFdez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DelsFdez/subscriptions","organizations_url":"https://api.github.com/users/DelsFdez/orgs","repos_url":"https://api.github.com/users/DelsFdez/repos","events_url":"https://api.github.com/users/DelsFdez/events{/privacy}","received_events_url":"https://api.github.com/users/DelsFdez/received_events","type":"User","site_admin":false},"body":"## Issue \r\nSpring cleaning for IWD\r\n","created_at":"2018-03-12T01:42:40Z","updated_at":"2018-03-12T03:14:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"452af4aabf012b75628639dd5bf9a6dd5c1c2bf0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ldev6/wtm/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ldev6/wtm/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ldev6/wtm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ldev6/wtm/issues/1/comments","statuses_url":"https://api.github.com/repos/ldev6/wtm/statuses/ee02d08d4f82cb064642e4d204ec9f221792fa00","head":{"label":"ldev6:feature/clean_up_18","ref":"feature/clean_up_18","sha":"ee02d08d4f82cb064642e4d204ec9f221792fa00","user":{"login":"ldev6","id":2295842,"avatar_url":"https://avatars1.githubusercontent.com/u/2295842?v=4","gravatar_id":"","url":"https://api.github.com/users/ldev6","html_url":"https://github.com/ldev6","followers_url":"https://api.github.com/users/ldev6/followers","following_url":"https://api.github.com/users/ldev6/following{/other_user}","gists_url":"https://api.github.com/users/ldev6/gists{/gist_id}","starred_url":"https://api.github.com/users/ldev6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldev6/subscriptions","organizations_url":"https://api.github.com/users/ldev6/orgs","repos_url":"https://api.github.com/users/ldev6/repos","events_url":"https://api.github.com/users/ldev6/events{/privacy}","received_events_url":"https://api.github.com/users/ldev6/received_events","type":"User","site_admin":false},"repo":{"id":82505848,"name":"wtm","full_name":"ldev6/wtm","owner":{"login":"ldev6","id":2295842,"avatar_url":"https://avatars1.githubusercontent.com/u/2295842?v=4","gravatar_id":"","url":"https://api.github.com/users/ldev6","html_url":"https://github.com/ldev6","followers_url":"https://api.github.com/users/ldev6/followers","following_url":"https://api.github.com/users/ldev6/following{/other_user}","gists_url":"https://api.github.com/users/ldev6/gists{/gist_id}","starred_url":"https://api.github.com/users/ldev6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldev6/subscriptions","organizations_url":"https://api.github.com/users/ldev6/orgs","repos_url":"https://api.github.com/users/ldev6/repos","events_url":"https://api.github.com/users/ldev6/events{/privacy}","received_events_url":"https://api.github.com/users/ldev6/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ldev6/wtm","description":null,"fork":false,"url":"https://api.github.com/repos/ldev6/wtm","forks_url":"https://api.github.com/repos/ldev6/wtm/forks","keys_url":"https://api.github.com/repos/ldev6/wtm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ldev6/wtm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ldev6/wtm/teams","hooks_url":"https://api.github.com/repos/ldev6/wtm/hooks","issue_events_url":"https://api.github.com/repos/ldev6/wtm/issues/events{/number}","events_url":"https://api.github.com/repos/ldev6/wtm/events","assignees_url":"https://api.github.com/repos/ldev6/wtm/assignees{/user}","branches_url":"https://api.github.com/repos/ldev6/wtm/branches{/branch}","tags_url":"https://api.github.com/repos/ldev6/wtm/tags","blobs_url":"https://api.github.com/repos/ldev6/wtm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ldev6/wtm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ldev6/wtm/git/refs{/sha}","trees_url":"https://api.github.com/repos/ldev6/wtm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ldev6/wtm/statuses/{sha}","languages_url":"https://api.github.com/repos/ldev6/wtm/languages","stargazers_url":"https://api.github.com/repos/ldev6/wtm/stargazers","contributors_url":"https://api.github.com/repos/ldev6/wtm/contributors","subscribers_url":"https://api.github.com/repos/ldev6/wtm/subscribers","subscription_url":"https://api.github.com/repos/ldev6/wtm/subscription","commits_url":"https://api.github.com/repos/ldev6/wtm/commits{/sha}","git_commits_url":"https://api.github.com/repos/ldev6/wtm/git/commits{/sha}","comments_url":"https://api.github.com/repos/ldev6/wtm/comments{/number}","issue_comment_url":"https://api.github.com/repos/ldev6/wtm/issues/comments{/number}","contents_url":"https://api.github.com/repos/ldev6/wtm/contents/{+path}","compare_url":"https://api.github.com/repos/ldev6/wtm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ldev6/wtm/merges","archive_url":"https://api.github.com/repos/ldev6/wtm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ldev6/wtm/downloads","issues_url":"https://api.github.com/repos/ldev6/wtm/issues{/number}","pulls_url":"https://api.github.com/repos/ldev6/wtm/pulls{/number}","milestones_url":"https://api.github.com/repos/ldev6/wtm/milestones{/number}","notifications_url":"https://api.github.com/repos/ldev6/wtm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ldev6/wtm/labels{/name}","releases_url":"https://api.github.com/repos/ldev6/wtm/releases{/id}","deployments_url":"https://api.github.com/repos/ldev6/wtm/deployments","created_at":"2017-02-20T01:57:38Z","updated_at":"2017-02-20T02:01:00Z","pushed_at":"2018-03-12T01:53:07Z","git_url":"git://github.com/ldev6/wtm.git","ssh_url":"git@github.com:ldev6/wtm.git","clone_url":"https://github.com/ldev6/wtm.git","svn_url":"https://github.com/ldev6/wtm","homepage":null,"size":1764,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"ldev6:edition2018","ref":"edition2018","sha":"cdc46775c80294787e3aedcbd540715972f2a184","user":{"login":"ldev6","id":2295842,"avatar_url":"https://avatars1.githubusercontent.com/u/2295842?v=4","gravatar_id":"","url":"https://api.github.com/users/ldev6","html_url":"https://github.com/ldev6","followers_url":"https://api.github.com/users/ldev6/followers","following_url":"https://api.github.com/users/ldev6/following{/other_user}","gists_url":"https://api.github.com/users/ldev6/gists{/gist_id}","starred_url":"https://api.github.com/users/ldev6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldev6/subscriptions","organizations_url":"https://api.github.com/users/ldev6/orgs","repos_url":"https://api.github.com/users/ldev6/repos","events_url":"https://api.github.com/users/ldev6/events{/privacy}","received_events_url":"https://api.github.com/users/ldev6/received_events","type":"User","site_admin":false},"repo":{"id":82505848,"name":"wtm","full_name":"ldev6/wtm","owner":{"login":"ldev6","id":2295842,"avatar_url":"https://avatars1.githubusercontent.com/u/2295842?v=4","gravatar_id":"","url":"https://api.github.com/users/ldev6","html_url":"https://github.com/ldev6","followers_url":"https://api.github.com/users/ldev6/followers","following_url":"https://api.github.com/users/ldev6/following{/other_user}","gists_url":"https://api.github.com/users/ldev6/gists{/gist_id}","starred_url":"https://api.github.com/users/ldev6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldev6/subscriptions","organizations_url":"https://api.github.com/users/ldev6/orgs","repos_url":"https://api.github.com/users/ldev6/repos","events_url":"https://api.github.com/users/ldev6/events{/privacy}","received_events_url":"https://api.github.com/users/ldev6/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ldev6/wtm","description":null,"fork":false,"url":"https://api.github.com/repos/ldev6/wtm","forks_url":"https://api.github.com/repos/ldev6/wtm/forks","keys_url":"https://api.github.com/repos/ldev6/wtm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ldev6/wtm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ldev6/wtm/teams","hooks_url":"https://api.github.com/repos/ldev6/wtm/hooks","issue_events_url":"https://api.github.com/repos/ldev6/wtm/issues/events{/number}","events_url":"https://api.github.com/repos/ldev6/wtm/events","assignees_url":"https://api.github.com/repos/ldev6/wtm/assignees{/user}","branches_url":"https://api.github.com/repos/ldev6/wtm/branches{/branch}","tags_url":"https://api.github.com/repos/ldev6/wtm/tags","blobs_url":"https://api.github.com/repos/ldev6/wtm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ldev6/wtm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ldev6/wtm/git/refs{/sha}","trees_url":"https://api.github.com/repos/ldev6/wtm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ldev6/wtm/statuses/{sha}","languages_url":"https://api.github.com/repos/ldev6/wtm/languages","stargazers_url":"https://api.github.com/repos/ldev6/wtm/stargazers","contributors_url":"https://api.github.com/repos/ldev6/wtm/contributors","subscribers_url":"https://api.github.com/repos/ldev6/wtm/subscribers","subscription_url":"https://api.github.com/repos/ldev6/wtm/subscription","commits_url":"https://api.github.com/repos/ldev6/wtm/commits{/sha}","git_commits_url":"https://api.github.com/repos/ldev6/wtm/git/commits{/sha}","comments_url":"https://api.github.com/repos/ldev6/wtm/comments{/number}","issue_comment_url":"https://api.github.com/repos/ldev6/wtm/issues/comments{/number}","contents_url":"https://api.github.com/repos/ldev6/wtm/contents/{+path}","compare_url":"https://api.github.com/repos/ldev6/wtm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ldev6/wtm/merges","archive_url":"https://api.github.com/repos/ldev6/wtm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ldev6/wtm/downloads","issues_url":"https://api.github.com/repos/ldev6/wtm/issues{/number}","pulls_url":"https://api.github.com/repos/ldev6/wtm/pulls{/number}","milestones_url":"https://api.github.com/repos/ldev6/wtm/milestones{/number}","notifications_url":"https://api.github.com/repos/ldev6/wtm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ldev6/wtm/labels{/name}","releases_url":"https://api.github.com/repos/ldev6/wtm/releases{/id}","deployments_url":"https://api.github.com/repos/ldev6/wtm/deployments","created_at":"2017-02-20T01:57:38Z","updated_at":"2017-02-20T02:01:00Z","pushed_at":"2018-03-12T01:53:07Z","git_url":"git://github.com/ldev6/wtm.git","ssh_url":"git@github.com:ldev6/wtm.git","clone_url":"https://github.com/ldev6/wtm.git","svn_url":"https://github.com/ldev6/wtm","homepage":null,"size":1764,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ldev6/wtm/pulls/1"},"html":{"href":"https://github.com/ldev6/wtm/pull/1"},"issue":{"href":"https://api.github.com/repos/ldev6/wtm/issues/1"},"comments":{"href":"https://api.github.com/repos/ldev6/wtm/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ldev6/wtm/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ldev6/wtm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ldev6/wtm/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ldev6/wtm/statuses/ee02d08d4f82cb064642e4d204ec9f221792fa00"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"DelsFdez"}}