{"action":"created","comment":{"url":"https://api.github.com/repos/googlesamples/android-architecture/pulls/comments/76516813","id":76516813,"diff_hunk":"@@ -91,34 +108,31 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,\n         FloatingActionButton fab =\n                 (FloatingActionButton) getActivity().findViewById(R.id.fab_edit_task);\n \n-        fab.setOnClickListener(new View.OnClickListener() {\n-            @Override\n-            public void onClick(View v) {\n-                mPresenter.editTask();\n-            }\n-        });\n+        // RxBindings\n+        mEditTaskClick = RxView.clicks(fab);\n+        mCheckedChanges = RxCompoundButton\n+                .checkedChanges(mDetailCompleteStatus)\n+                .doOnNext(checked -> Log.i(\"TEST\", \"Pre-UpdatingFilter \" + checked))\n+                .filter(checked -> !mUpdating)","path":"todoapp/app/src/main/java/com/example/android/architecture/blueprints/todoapp/taskdetail/TaskDetailFragment.java","position":88,"original_position":88,"commit_id":"9ab4dd8f255c134692c7dc4baf49ed43dd9d650a","original_commit_id":"9ab4dd8f255c134692c7dc4baf49ed43dd9d650a","user":{"login":"florina-muntenescu","id":2998890,"avatar_url":"https://avatars.githubusercontent.com/u/2998890?v=3","gravatar_id":"","url":"https://api.github.com/users/florina-muntenescu","html_url":"https://github.com/florina-muntenescu","followers_url":"https://api.github.com/users/florina-muntenescu/followers","following_url":"https://api.github.com/users/florina-muntenescu/following{/other_user}","gists_url":"https://api.github.com/users/florina-muntenescu/gists{/gist_id}","starred_url":"https://api.github.com/users/florina-muntenescu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florina-muntenescu/subscriptions","organizations_url":"https://api.github.com/users/florina-muntenescu/orgs","repos_url":"https://api.github.com/users/florina-muntenescu/repos","events_url":"https://api.github.com/users/florina-muntenescu/events{/privacy}","received_events_url":"https://api.github.com/users/florina-muntenescu/received_events","type":"User","site_admin":false},"body":"My main concern is about this kind of logic code in the View, since you can't unit test this. ","created_at":"2016-08-27T14:15:51Z","updated_at":"2016-08-27T14:15:51Z","html_url":"https://github.com/googlesamples/android-architecture/pull/159#discussion_r76516813","pull_request_url":"https://api.github.com/repos/googlesamples/android-architecture/pulls/159","_links":{"self":{"href":"https://api.github.com/repos/googlesamples/android-architecture/pulls/comments/76516813"},"html":{"href":"https://github.com/googlesamples/android-architecture/pull/159#discussion_r76516813"},"pull_request":{"href":"https://api.github.com/repos/googlesamples/android-architecture/pulls/159"}}},"pull_request":{"url":"https://api.github.com/repos/googlesamples/android-architecture/pulls/159","id":82911247,"html_url":"https://github.com/googlesamples/android-architecture/pull/159","diff_url":"https://github.com/googlesamples/android-architecture/pull/159.diff","patch_url":"https://github.com/googlesamples/android-architecture/pull/159.patch","issue_url":"https://api.github.com/repos/googlesamples/android-architecture/issues/159","number":159,"state":"open","locked":false,"title":"Proposed extension of RxJava usage across all layers of the MVP","user":{"login":"kanawish","id":1449618,"avatar_url":"https://avatars.githubusercontent.com/u/1449618?v=3","gravatar_id":"","url":"https://api.github.com/users/kanawish","html_url":"https://github.com/kanawish","followers_url":"https://api.github.com/users/kanawish/followers","following_url":"https://api.github.com/users/kanawish/following{/other_user}","gists_url":"https://api.github.com/users/kanawish/gists{/gist_id}","starred_url":"https://api.github.com/users/kanawish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanawish/subscriptions","organizations_url":"https://api.github.com/users/kanawish/orgs","repos_url":"https://api.github.com/users/kanawish/repos","events_url":"https://api.github.com/users/kanawish/events{/privacy}","received_events_url":"https://api.github.com/users/kanawish/received_events","type":"User","site_admin":false},"body":"I've built a small example of how we could use RxJava across the View/Presenter bridge. Benefits include the possibility of writing Presenter tests as observable chains, cleaner observable chain building in the presenter (allows for debouncing, more sophisticated UX behavior, etc.)\r\n\r\nSmall note on the change to the Contract, I've moved the emitting Observable to the view side. I believe this still respects the MVP model, based on this model:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1449618/18011483/68139072-6b83-11e6-9493-30fc6d5b9fc4.png)\r\n\r\nNotes:\r\n\r\n- Changes to contract to reflect View's emitter/consumer nature when using Observables.\r\n- Example of using RxRelay to hide implementation details / lifecycle issues from presenter.\r\n- Example of using RxBindings on View side.\r\n- Added RetroLambda support.\r\n\r\n","created_at":"2016-08-26T15:52:26Z","updated_at":"2016-08-27T14:15:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eec97f95cca32f3caa811f9d006a61a68c4d1b29","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/googlesamples/android-architecture/pulls/159/commits","review_comments_url":"https://api.github.com/repos/googlesamples/android-architecture/pulls/159/comments","review_comment_url":"https://api.github.com/repos/googlesamples/android-architecture/pulls/comments{/number}","comments_url":"https://api.github.com/repos/googlesamples/android-architecture/issues/159/comments","statuses_url":"https://api.github.com/repos/googlesamples/android-architecture/statuses/9ab4dd8f255c134692c7dc4baf49ed43dd9d650a","head":{"label":"kanawish:dev-todo-mvp-rxjava","ref":"dev-todo-mvp-rxjava","sha":"9ab4dd8f255c134692c7dc4baf49ed43dd9d650a","user":{"login":"kanawish","id":1449618,"avatar_url":"https://avatars.githubusercontent.com/u/1449618?v=3","gravatar_id":"","url":"https://api.github.com/users/kanawish","html_url":"https://github.com/kanawish","followers_url":"https://api.github.com/users/kanawish/followers","following_url":"https://api.github.com/users/kanawish/following{/other_user}","gists_url":"https://api.github.com/users/kanawish/gists{/gist_id}","starred_url":"https://api.github.com/users/kanawish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanawish/subscriptions","organizations_url":"https://api.github.com/users/kanawish/orgs","repos_url":"https://api.github.com/users/kanawish/repos","events_url":"https://api.github.com/users/kanawish/events{/privacy}","received_events_url":"https://api.github.com/users/kanawish/received_events","type":"User","site_admin":false},"repo":{"id":66658589,"name":"android-architecture","full_name":"kanawish/android-architecture","owner":{"login":"kanawish","id":1449618,"avatar_url":"https://avatars.githubusercontent.com/u/1449618?v=3","gravatar_id":"","url":"https://api.github.com/users/kanawish","html_url":"https://github.com/kanawish","followers_url":"https://api.github.com/users/kanawish/followers","following_url":"https://api.github.com/users/kanawish/following{/other_user}","gists_url":"https://api.github.com/users/kanawish/gists{/gist_id}","starred_url":"https://api.github.com/users/kanawish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanawish/subscriptions","organizations_url":"https://api.github.com/users/kanawish/orgs","repos_url":"https://api.github.com/users/kanawish/repos","events_url":"https://api.github.com/users/kanawish/events{/privacy}","received_events_url":"https://api.github.com/users/kanawish/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kanawish/android-architecture","description":"A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.","fork":true,"url":"https://api.github.com/repos/kanawish/android-architecture","forks_url":"https://api.github.com/repos/kanawish/android-architecture/forks","keys_url":"https://api.github.com/repos/kanawish/android-architecture/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kanawish/android-architecture/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kanawish/android-architecture/teams","hooks_url":"https://api.github.com/repos/kanawish/android-architecture/hooks","issue_events_url":"https://api.github.com/repos/kanawish/android-architecture/issues/events{/number}","events_url":"https://api.github.com/repos/kanawish/android-architecture/events","assignees_url":"https://api.github.com/repos/kanawish/android-architecture/assignees{/user}","branches_url":"https://api.github.com/repos/kanawish/android-architecture/branches{/branch}","tags_url":"https://api.github.com/repos/kanawish/android-architecture/tags","blobs_url":"https://api.github.com/repos/kanawish/android-architecture/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kanawish/android-architecture/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kanawish/android-architecture/git/refs{/sha}","trees_url":"https://api.github.com/repos/kanawish/android-architecture/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kanawish/android-architecture/statuses/{sha}","languages_url":"https://api.github.com/repos/kanawish/android-architecture/languages","stargazers_url":"https://api.github.com/repos/kanawish/android-architecture/stargazers","contributors_url":"https://api.github.com/repos/kanawish/android-architecture/contributors","subscribers_url":"https://api.github.com/repos/kanawish/android-architecture/subscribers","subscription_url":"https://api.github.com/repos/kanawish/android-architecture/subscription","commits_url":"https://api.github.com/repos/kanawish/android-architecture/commits{/sha}","git_commits_url":"https://api.github.com/repos/kanawish/android-architecture/git/commits{/sha}","comments_url":"https://api.github.com/repos/kanawish/android-architecture/comments{/number}","issue_comment_url":"https://api.github.com/repos/kanawish/android-architecture/issues/comments{/number}","contents_url":"https://api.github.com/repos/kanawish/android-architecture/contents/{+path}","compare_url":"https://api.github.com/repos/kanawish/android-architecture/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kanawish/android-architecture/merges","archive_url":"https://api.github.com/repos/kanawish/android-architecture/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kanawish/android-architecture/downloads","issues_url":"https://api.github.com/repos/kanawish/android-architecture/issues{/number}","pulls_url":"https://api.github.com/repos/kanawish/android-architecture/pulls{/number}","milestones_url":"https://api.github.com/repos/kanawish/android-architecture/milestones{/number}","notifications_url":"https://api.github.com/repos/kanawish/android-architecture/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kanawish/android-architecture/labels{/name}","releases_url":"https://api.github.com/repos/kanawish/android-architecture/releases{/id}","deployments_url":"https://api.github.com/repos/kanawish/android-architecture/deployments","created_at":"2016-08-26T15:29:03Z","updated_at":"2016-08-27T14:09:19Z","pushed_at":"2016-08-26T15:49:13Z","git_url":"git://github.com/kanawish/android-architecture.git","ssh_url":"git@github.com:kanawish/android-architecture.git","clone_url":"https://github.com/kanawish/android-architecture.git","svn_url":"https://github.com/kanawish/android-architecture","homepage":"","size":7140,"stargazers_count":1,"watchers_count":1,"language":null,"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":1,"default_branch":"master"}},"base":{"label":"googlesamples:dev-todo-mvp-rxjava","ref":"dev-todo-mvp-rxjava","sha":"9285c542a22bf5e452906eb9e458d9a2e04b575f","user":{"login":"googlesamples","id":7378196,"avatar_url":"https://avatars.githubusercontent.com/u/7378196?v=3","gravatar_id":"","url":"https://api.github.com/users/googlesamples","html_url":"https://github.com/googlesamples","followers_url":"https://api.github.com/users/googlesamples/followers","following_url":"https://api.github.com/users/googlesamples/following{/other_user}","gists_url":"https://api.github.com/users/googlesamples/gists{/gist_id}","starred_url":"https://api.github.com/users/googlesamples/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googlesamples/subscriptions","organizations_url":"https://api.github.com/users/googlesamples/orgs","repos_url":"https://api.github.com/users/googlesamples/repos","events_url":"https://api.github.com/users/googlesamples/events{/privacy}","received_events_url":"https://api.github.com/users/googlesamples/received_events","type":"Organization","site_admin":false},"repo":{"id":51148780,"name":"android-architecture","full_name":"googlesamples/android-architecture","owner":{"login":"googlesamples","id":7378196,"avatar_url":"https://avatars.githubusercontent.com/u/7378196?v=3","gravatar_id":"","url":"https://api.github.com/users/googlesamples","html_url":"https://github.com/googlesamples","followers_url":"https://api.github.com/users/googlesamples/followers","following_url":"https://api.github.com/users/googlesamples/following{/other_user}","gists_url":"https://api.github.com/users/googlesamples/gists{/gist_id}","starred_url":"https://api.github.com/users/googlesamples/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googlesamples/subscriptions","organizations_url":"https://api.github.com/users/googlesamples/orgs","repos_url":"https://api.github.com/users/googlesamples/repos","events_url":"https://api.github.com/users/googlesamples/events{/privacy}","received_events_url":"https://api.github.com/users/googlesamples/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/googlesamples/android-architecture","description":"A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.","fork":false,"url":"https://api.github.com/repos/googlesamples/android-architecture","forks_url":"https://api.github.com/repos/googlesamples/android-architecture/forks","keys_url":"https://api.github.com/repos/googlesamples/android-architecture/keys{/key_id}","collaborators_url":"https://api.github.com/repos/googlesamples/android-architecture/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/googlesamples/android-architecture/teams","hooks_url":"https://api.github.com/repos/googlesamples/android-architecture/hooks","issue_events_url":"https://api.github.com/repos/googlesamples/android-architecture/issues/events{/number}","events_url":"https://api.github.com/repos/googlesamples/android-architecture/events","assignees_url":"https://api.github.com/repos/googlesamples/android-architecture/assignees{/user}","branches_url":"https://api.github.com/repos/googlesamples/android-architecture/branches{/branch}","tags_url":"https://api.github.com/repos/googlesamples/android-architecture/tags","blobs_url":"https://api.github.com/repos/googlesamples/android-architecture/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/googlesamples/android-architecture/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/googlesamples/android-architecture/git/refs{/sha}","trees_url":"https://api.github.com/repos/googlesamples/android-architecture/git/trees{/sha}","statuses_url":"https://api.github.com/repos/googlesamples/android-architecture/statuses/{sha}","languages_url":"https://api.github.com/repos/googlesamples/android-architecture/languages","stargazers_url":"https://api.github.com/repos/googlesamples/android-architecture/stargazers","contributors_url":"https://api.github.com/repos/googlesamples/android-architecture/contributors","subscribers_url":"https://api.github.com/repos/googlesamples/android-architecture/subscribers","subscription_url":"https://api.github.com/repos/googlesamples/android-architecture/subscription","commits_url":"https://api.github.com/repos/googlesamples/android-architecture/commits{/sha}","git_commits_url":"https://api.github.com/repos/googlesamples/android-architecture/git/commits{/sha}","comments_url":"https://api.github.com/repos/googlesamples/android-architecture/comments{/number}","issue_comment_url":"https://api.github.com/repos/googlesamples/android-architecture/issues/comments{/number}","contents_url":"https://api.github.com/repos/googlesamples/android-architecture/contents/{+path}","compare_url":"https://api.github.com/repos/googlesamples/android-architecture/compare/{base}...{head}","merges_url":"https://api.github.com/repos/googlesamples/android-architecture/merges","archive_url":"https://api.github.com/repos/googlesamples/android-architecture/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/googlesamples/android-architecture/downloads","issues_url":"https://api.github.com/repos/googlesamples/android-architecture/issues{/number}","pulls_url":"https://api.github.com/repos/googlesamples/android-architecture/pulls{/number}","milestones_url":"https://api.github.com/repos/googlesamples/android-architecture/milestones{/number}","notifications_url":"https://api.github.com/repos/googlesamples/android-architecture/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/googlesamples/android-architecture/labels{/name}","releases_url":"https://api.github.com/repos/googlesamples/android-architecture/releases{/id}","deployments_url":"https://api.github.com/repos/googlesamples/android-architecture/deployments","created_at":"2016-02-05T13:42:07Z","updated_at":"2016-08-27T09:28:05Z","pushed_at":"2016-08-26T15:52:26Z","git_url":"git://github.com/googlesamples/android-architecture.git","ssh_url":"git@github.com:googlesamples/android-architecture.git","clone_url":"https://github.com/googlesamples/android-architecture.git","svn_url":"https://github.com/googlesamples/android-architecture","homepage":"","size":7649,"stargazers_count":9531,"watchers_count":9531,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2340,"mirror_url":null,"open_issues_count":47,"forks":2340,"open_issues":47,"watchers":9531,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/googlesamples/android-architecture/pulls/159"},"html":{"href":"https://github.com/googlesamples/android-architecture/pull/159"},"issue":{"href":"https://api.github.com/repos/googlesamples/android-architecture/issues/159"},"comments":{"href":"https://api.github.com/repos/googlesamples/android-architecture/issues/159/comments"},"review_comments":{"href":"https://api.github.com/repos/googlesamples/android-architecture/pulls/159/comments"},"review_comment":{"href":"https://api.github.com/repos/googlesamples/android-architecture/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/googlesamples/android-architecture/pulls/159/commits"},"statuses":{"href":"https://api.github.com/repos/googlesamples/android-architecture/statuses/9ab4dd8f255c134692c7dc4baf49ed43dd9d650a"}}}}
{"actor":{"display_login":"florina-muntenescu"}}