{"action":"created","comment":{"url":"https://api.github.com/repos/alamkanak/Android-Week-View/pulls/comments/33749259","id":33749259,"diff_hunk":"@@ -106,4 +106,20 @@ public long getId() {\n     public void setId(long id) {\n         this.mId = id;\n     }\n+\n+    @Override\n+    public boolean equals(Object o) {\n+        if (this == o) return true;\n+        if (o == null || getClass() != o.getClass()) return false;\n+\n+        WeekViewEvent that = (WeekViewEvent) o;\n+\n+        return mId == that.mId;\n+\n+    }\n+\n+    @Override\n+    public int hashCode() {\n+        return (int) (mId ^ (mId >>> 32));\n+    }","path":"library/src/main/java/com/alamkanak/weekview/WeekViewEvent.java","position":19,"original_position":19,"commit_id":"4c35ab3fcadf0f9324d95adad96ab87b75da0dc3","original_commit_id":"4c35ab3fcadf0f9324d95adad96ab87b75da0dc3","user":{"login":"Vanco","id":11991700,"avatar_url":"https://avatars.githubusercontent.com/u/11991700?v=3","gravatar_id":"","url":"https://api.github.com/users/Vanco","html_url":"https://github.com/Vanco","followers_url":"https://api.github.com/users/Vanco/followers","following_url":"https://api.github.com/users/Vanco/following{/other_user}","gists_url":"https://api.github.com/users/Vanco/gists{/gist_id}","starred_url":"https://api.github.com/users/Vanco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vanco/subscriptions","organizations_url":"https://api.github.com/users/Vanco/orgs","repos_url":"https://api.github.com/users/Vanco/repos","events_url":"https://api.github.com/users/Vanco/events{/privacy}","received_events_url":"https://api.github.com/users/Vanco/received_events","type":"User","site_admin":false},"body":"I actually implicit use the `equals` and `hashCode`  in the `MonthChangeListener` when we feed data in.  we need async call our server to get event data, and feed in. Unfortunately, the onMonthChange are called sync way.  So we make a pain implement to make it happen. We Use Set to make sure same event only add once into the Set.  So the WeekView can display correctly.  That's not good, but just work for me.\r\n\r\n```\r\n// cache set of event\r\nprivate Set<WeekViewEvent> events=null;\r\n\r\n// async call our server to get event data\r\nWeekView.MonthChangeListener mMonthChangeListener = new WeekView.MonthChangeListener() {\r\n        public List<WeekViewEvent> onMonthChange(int newYear, int newMonth) {\r\n        // ... call server asnyc\r\n        \r\nRequstServer.getInstance(this).getEvent(request, new Succeed<Response>() {\r\n            @Override\r\n            public void onSucced(Response object) {\r\n                \r\n                    for(int i=0;i<object.getList().size();i++){\r\n                        WeekViewEvent event=new WeekViewEvent();\r\n                        \r\n                        // ...... populate event and add to Set.\r\n                        \r\n                        events.add(event);\r\n                    }\r\n                    weekView.notifyDatasetChanged();\r\n                }\r\n            }\r\n        });\r\n\r\n        ArrayList<WeekViewEvent> evs = new ArrayList<>();\r\n            evs.addAll(events);\r\n            return evs;\r\n     }\r\n    };\r\n```","created_at":"2015-07-02T06:03:21Z","updated_at":"2015-07-02T06:03:21Z","html_url":"https://github.com/alamkanak/Android-Week-View/pull/151#discussion_r33749259","pull_request_url":"https://api.github.com/repos/alamkanak/Android-Week-View/pulls/151","_links":{"self":{"href":"https://api.github.com/repos/alamkanak/Android-Week-View/pulls/comments/33749259"},"html":{"href":"https://github.com/alamkanak/Android-Week-View/pull/151#discussion_r33749259"},"pull_request":{"href":"https://api.github.com/repos/alamkanak/Android-Week-View/pulls/151"}}},"pull_request":{"url":"https://api.github.com/repos/alamkanak/Android-Week-View/pulls/151","id":38950073,"html_url":"https://github.com/alamkanak/Android-Week-View/pull/151","diff_url":"https://github.com/alamkanak/Android-Week-View/pull/151.diff","patch_url":"https://github.com/alamkanak/Android-Week-View/pull/151.patch","issue_url":"https://api.github.com/repos/alamkanak/Android-Week-View/issues/151","number":151,"state":"open","locked":false,"title":"#150 support event over three days.","user":{"login":"Vanco","id":11991700,"avatar_url":"https://avatars.githubusercontent.com/u/11991700?v=3","gravatar_id":"","url":"https://api.github.com/users/Vanco","html_url":"https://github.com/Vanco","followers_url":"https://api.github.com/users/Vanco/followers","following_url":"https://api.github.com/users/Vanco/following{/other_user}","gists_url":"https://api.github.com/users/Vanco/gists{/gist_id}","starred_url":"https://api.github.com/users/Vanco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vanco/subscriptions","organizations_url":"https://api.github.com/users/Vanco/orgs","repos_url":"https://api.github.com/users/Vanco/repos","events_url":"https://api.github.com/users/Vanco/events{/privacy}","received_events_url":"https://api.github.com/users/Vanco/received_events","type":"User","site_admin":false},"body":"Add unique check based on the event id before add to cache, and and support the event which cross over more than three days.","created_at":"2015-07-01T05:46:30Z","updated_at":"2015-07-02T06:03:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"646794eff431c431ea7cc1bed388d57bda1b9b3d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alamkanak/Android-Week-View/pulls/151/commits","review_comments_url":"https://api.github.com/repos/alamkanak/Android-Week-View/pulls/151/comments","review_comment_url":"https://api.github.com/repos/alamkanak/Android-Week-View/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alamkanak/Android-Week-View/issues/151/comments","statuses_url":"https://api.github.com/repos/alamkanak/Android-Week-View/statuses/4c35ab3fcadf0f9324d95adad96ab87b75da0dc3","head":{"label":"Vanco:master","ref":"master","sha":"4c35ab3fcadf0f9324d95adad96ab87b75da0dc3","user":{"login":"Vanco","id":11991700,"avatar_url":"https://avatars.githubusercontent.com/u/11991700?v=3","gravatar_id":"","url":"https://api.github.com/users/Vanco","html_url":"https://github.com/Vanco","followers_url":"https://api.github.com/users/Vanco/followers","following_url":"https://api.github.com/users/Vanco/following{/other_user}","gists_url":"https://api.github.com/users/Vanco/gists{/gist_id}","starred_url":"https://api.github.com/users/Vanco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vanco/subscriptions","organizations_url":"https://api.github.com/users/Vanco/orgs","repos_url":"https://api.github.com/users/Vanco/repos","events_url":"https://api.github.com/users/Vanco/events{/privacy}","received_events_url":"https://api.github.com/users/Vanco/received_events","type":"User","site_admin":false},"repo":{"id":38348873,"name":"Android-Week-View","full_name":"Vanco/Android-Week-View","owner":{"login":"Vanco","id":11991700,"avatar_url":"https://avatars.githubusercontent.com/u/11991700?v=3","gravatar_id":"","url":"https://api.github.com/users/Vanco","html_url":"https://github.com/Vanco","followers_url":"https://api.github.com/users/Vanco/followers","following_url":"https://api.github.com/users/Vanco/following{/other_user}","gists_url":"https://api.github.com/users/Vanco/gists{/gist_id}","starred_url":"https://api.github.com/users/Vanco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vanco/subscriptions","organizations_url":"https://api.github.com/users/Vanco/orgs","repos_url":"https://api.github.com/users/Vanco/repos","events_url":"https://api.github.com/users/Vanco/events{/privacy}","received_events_url":"https://api.github.com/users/Vanco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vanco/Android-Week-View","description":"Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.","fork":true,"url":"https://api.github.com/repos/Vanco/Android-Week-View","forks_url":"https://api.github.com/repos/Vanco/Android-Week-View/forks","keys_url":"https://api.github.com/repos/Vanco/Android-Week-View/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vanco/Android-Week-View/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vanco/Android-Week-View/teams","hooks_url":"https://api.github.com/repos/Vanco/Android-Week-View/hooks","issue_events_url":"https://api.github.com/repos/Vanco/Android-Week-View/issues/events{/number}","events_url":"https://api.github.com/repos/Vanco/Android-Week-View/events","assignees_url":"https://api.github.com/repos/Vanco/Android-Week-View/assignees{/user}","branches_url":"https://api.github.com/repos/Vanco/Android-Week-View/branches{/branch}","tags_url":"https://api.github.com/repos/Vanco/Android-Week-View/tags","blobs_url":"https://api.github.com/repos/Vanco/Android-Week-View/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vanco/Android-Week-View/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vanco/Android-Week-View/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vanco/Android-Week-View/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vanco/Android-Week-View/statuses/{sha}","languages_url":"https://api.github.com/repos/Vanco/Android-Week-View/languages","stargazers_url":"https://api.github.com/repos/Vanco/Android-Week-View/stargazers","contributors_url":"https://api.github.com/repos/Vanco/Android-Week-View/contributors","subscribers_url":"https://api.github.com/repos/Vanco/Android-Week-View/subscribers","subscription_url":"https://api.github.com/repos/Vanco/Android-Week-View/subscription","commits_url":"https://api.github.com/repos/Vanco/Android-Week-View/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vanco/Android-Week-View/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vanco/Android-Week-View/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vanco/Android-Week-View/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vanco/Android-Week-View/contents/{+path}","compare_url":"https://api.github.com/repos/Vanco/Android-Week-View/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vanco/Android-Week-View/merges","archive_url":"https://api.github.com/repos/Vanco/Android-Week-View/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vanco/Android-Week-View/downloads","issues_url":"https://api.github.com/repos/Vanco/Android-Week-View/issues{/number}","pulls_url":"https://api.github.com/repos/Vanco/Android-Week-View/pulls{/number}","milestones_url":"https://api.github.com/repos/Vanco/Android-Week-View/milestones{/number}","notifications_url":"https://api.github.com/repos/Vanco/Android-Week-View/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vanco/Android-Week-View/labels{/name}","releases_url":"https://api.github.com/repos/Vanco/Android-Week-View/releases{/id}","created_at":"2015-07-01T04:05:52Z","updated_at":"2015-07-01T04:05:53Z","pushed_at":"2015-07-01T05:36:43Z","git_url":"git://github.com/Vanco/Android-Week-View.git","ssh_url":"git@github.com:Vanco/Android-Week-View.git","clone_url":"https://github.com/Vanco/Android-Week-View.git","svn_url":"https://github.com/Vanco/Android-Week-View","homepage":"","size":1652,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"alamkanak:master","ref":"master","sha":"8aa4ec67d16e1d68809b4301c545cbca0eddfa96","user":{"login":"alamkanak","id":3194741,"avatar_url":"https://avatars.githubusercontent.com/u/3194741?v=3","gravatar_id":"","url":"https://api.github.com/users/alamkanak","html_url":"https://github.com/alamkanak","followers_url":"https://api.github.com/users/alamkanak/followers","following_url":"https://api.github.com/users/alamkanak/following{/other_user}","gists_url":"https://api.github.com/users/alamkanak/gists{/gist_id}","starred_url":"https://api.github.com/users/alamkanak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alamkanak/subscriptions","organizations_url":"https://api.github.com/users/alamkanak/orgs","repos_url":"https://api.github.com/users/alamkanak/repos","events_url":"https://api.github.com/users/alamkanak/events{/privacy}","received_events_url":"https://api.github.com/users/alamkanak/received_events","type":"User","site_admin":false},"repo":{"id":24139593,"name":"Android-Week-View","full_name":"alamkanak/Android-Week-View","owner":{"login":"alamkanak","id":3194741,"avatar_url":"https://avatars.githubusercontent.com/u/3194741?v=3","gravatar_id":"","url":"https://api.github.com/users/alamkanak","html_url":"https://github.com/alamkanak","followers_url":"https://api.github.com/users/alamkanak/followers","following_url":"https://api.github.com/users/alamkanak/following{/other_user}","gists_url":"https://api.github.com/users/alamkanak/gists{/gist_id}","starred_url":"https://api.github.com/users/alamkanak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alamkanak/subscriptions","organizations_url":"https://api.github.com/users/alamkanak/orgs","repos_url":"https://api.github.com/users/alamkanak/repos","events_url":"https://api.github.com/users/alamkanak/events{/privacy}","received_events_url":"https://api.github.com/users/alamkanak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alamkanak/Android-Week-View","description":"Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.","fork":false,"url":"https://api.github.com/repos/alamkanak/Android-Week-View","forks_url":"https://api.github.com/repos/alamkanak/Android-Week-View/forks","keys_url":"https://api.github.com/repos/alamkanak/Android-Week-View/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alamkanak/Android-Week-View/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alamkanak/Android-Week-View/teams","hooks_url":"https://api.github.com/repos/alamkanak/Android-Week-View/hooks","issue_events_url":"https://api.github.com/repos/alamkanak/Android-Week-View/issues/events{/number}","events_url":"https://api.github.com/repos/alamkanak/Android-Week-View/events","assignees_url":"https://api.github.com/repos/alamkanak/Android-Week-View/assignees{/user}","branches_url":"https://api.github.com/repos/alamkanak/Android-Week-View/branches{/branch}","tags_url":"https://api.github.com/repos/alamkanak/Android-Week-View/tags","blobs_url":"https://api.github.com/repos/alamkanak/Android-Week-View/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alamkanak/Android-Week-View/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alamkanak/Android-Week-View/git/refs{/sha}","trees_url":"https://api.github.com/repos/alamkanak/Android-Week-View/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alamkanak/Android-Week-View/statuses/{sha}","languages_url":"https://api.github.com/repos/alamkanak/Android-Week-View/languages","stargazers_url":"https://api.github.com/repos/alamkanak/Android-Week-View/stargazers","contributors_url":"https://api.github.com/repos/alamkanak/Android-Week-View/contributors","subscribers_url":"https://api.github.com/repos/alamkanak/Android-Week-View/subscribers","subscription_url":"https://api.github.com/repos/alamkanak/Android-Week-View/subscription","commits_url":"https://api.github.com/repos/alamkanak/Android-Week-View/commits{/sha}","git_commits_url":"https://api.github.com/repos/alamkanak/Android-Week-View/git/commits{/sha}","comments_url":"https://api.github.com/repos/alamkanak/Android-Week-View/comments{/number}","issue_comment_url":"https://api.github.com/repos/alamkanak/Android-Week-View/issues/comments{/number}","contents_url":"https://api.github.com/repos/alamkanak/Android-Week-View/contents/{+path}","compare_url":"https://api.github.com/repos/alamkanak/Android-Week-View/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alamkanak/Android-Week-View/merges","archive_url":"https://api.github.com/repos/alamkanak/Android-Week-View/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alamkanak/Android-Week-View/downloads","issues_url":"https://api.github.com/repos/alamkanak/Android-Week-View/issues{/number}","pulls_url":"https://api.github.com/repos/alamkanak/Android-Week-View/pulls{/number}","milestones_url":"https://api.github.com/repos/alamkanak/Android-Week-View/milestones{/number}","notifications_url":"https://api.github.com/repos/alamkanak/Android-Week-View/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alamkanak/Android-Week-View/labels{/name}","releases_url":"https://api.github.com/repos/alamkanak/Android-Week-View/releases{/id}","created_at":"2014-09-17T10:07:12Z","updated_at":"2015-07-02T01:44:58Z","pushed_at":"2015-07-01T05:46:30Z","git_url":"git://github.com/alamkanak/Android-Week-View.git","ssh_url":"git@github.com:alamkanak/Android-Week-View.git","clone_url":"https://github.com/alamkanak/Android-Week-View.git","svn_url":"https://github.com/alamkanak/Android-Week-View","homepage":"","size":1652,"stargazers_count":1082,"watchers_count":1082,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":310,"mirror_url":null,"open_issues_count":48,"forks":310,"open_issues":48,"watchers":1082,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alamkanak/Android-Week-View/pulls/151"},"html":{"href":"https://github.com/alamkanak/Android-Week-View/pull/151"},"issue":{"href":"https://api.github.com/repos/alamkanak/Android-Week-View/issues/151"},"comments":{"href":"https://api.github.com/repos/alamkanak/Android-Week-View/issues/151/comments"},"review_comments":{"href":"https://api.github.com/repos/alamkanak/Android-Week-View/pulls/151/comments"},"review_comment":{"href":"https://api.github.com/repos/alamkanak/Android-Week-View/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alamkanak/Android-Week-View/pulls/151/commits"},"statuses":{"href":"https://api.github.com/repos/alamkanak/Android-Week-View/statuses/4c35ab3fcadf0f9324d95adad96ab87b75da0dc3"}}}}