{"action":"created","comment":{"url":"https://api.github.com/repos/slapperwan/gh4a/pulls/comments/140671600","pull_request_review_id":64776830,"id":140671600,"diff_hunk":"@@ -284,129 +274,30 @@ public void onDestroyActionMode(ActionMode mode) {\n             mAdapter.notifyDataSetChanged();\n             updateFabVisibility();\n         }\n-    }\n-\n-    private class DeleteIssueLabelTask extends ProgressDialogTask<Void> {\n-        private final String mLabelName;\n-\n-        public DeleteIssueLabelTask(String labelName) {\n-            super(IssueLabelListActivity.this, R.string.deleting_msg);\n-            mLabelName = labelName;\n-        }\n-\n-        @Override\n-        protected ProgressDialogTask<Void> clone() {\n-            return new DeleteIssueLabelTask(mLabelName);\n-        }\n-\n-        @Override\n-        protected Void run() throws IOException {\n-            LabelService labelService = (LabelService)\n-                    Gh4Application.get().getService(Gh4Application.LABEL_SERVICE);\n-            labelService.deleteLabel(mRepoOwner, mRepoName, URLEncoder.encode(mLabelName, \"UTF-8\"));\n-            return null;\n-        }\n \n-        @Override\n-        protected void onSuccess(Void result) {\n-            forceLoaderReload(0);\n-            setResult(RESULT_OK);\n-        }\n-\n-        @Override\n-        protected String getErrorMessage() {\n-            return getContext().getString(R.string.issue_error_delete_label, mLabelName);\n-        }\n-    }\n-\n-    private class EditIssueLabelTask extends ProgressDialogTask<Void> {\n-        private final String mOldLabelName;\n-        private final String mNewLabelName;\n-        private final String mColor;\n-\n-        public EditIssueLabelTask(String oldLabelName, String newLabelName, String color) {\n-            super(IssueLabelListActivity.this, R.string.saving_msg);\n-            mOldLabelName = oldLabelName;\n-            mNewLabelName = newLabelName;\n-            mColor = color;\n-        }\n-\n-        @Override\n-        protected ProgressDialogTask<Void> clone() {\n-            return new EditIssueLabelTask(mOldLabelName, mNewLabelName, mColor);\n+        public void addIssue() {\n+            IssuesLabelService.addIssue(IssueLabelListActivity.this, getRootLayout(), mRepoOwner, mRepoName, mLabel.editedName, mLabel.editedColor)\n+                .doOnError(error -> {\n+                    mAdapter.remove(mAddedLabel);\n+                    mAddedLabel = null;\n+                })\n+                .subscribe(result -> {\n+                    forceLoaderReload(0);\n+                    mAddedLabel = null;\n+                    setResult(RESULT_OK);\n+                }, e -> {});","path":"app/src/main/java/com/gh4a/activities/issues_label/IssueLabelListActivity.java","position":134,"original_position":134,"commit_id":"bf34c348581178c7d570f2251596ca06bc734a53","original_commit_id":"bf34c348581178c7d570f2251596ca06bc734a53","user":{"login":"MattiaPrimavera","id":11927970,"avatar_url":"https://avatars1.githubusercontent.com/u/11927970?v=4","gravatar_id":"","url":"https://api.github.com/users/MattiaPrimavera","html_url":"https://github.com/MattiaPrimavera","followers_url":"https://api.github.com/users/MattiaPrimavera/followers","following_url":"https://api.github.com/users/MattiaPrimavera/following{/other_user}","gists_url":"https://api.github.com/users/MattiaPrimavera/gists{/gist_id}","starred_url":"https://api.github.com/users/MattiaPrimavera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattiaPrimavera/subscriptions","organizations_url":"https://api.github.com/users/MattiaPrimavera/orgs","repos_url":"https://api.github.com/users/MattiaPrimavera/repos","events_url":"https://api.github.com/users/MattiaPrimavera/events{/privacy}","received_events_url":"https://api.github.com/users/MattiaPrimavera/received_events","type":"User","site_admin":false},"body":"I'm sorry, I did not understand, could you detail that pls ? ","created_at":"2017-09-24T23:55:13Z","updated_at":"2017-09-24T23:55:13Z","html_url":"https://github.com/slapperwan/gh4a/pull/698#discussion_r140671600","pull_request_url":"https://api.github.com/repos/slapperwan/gh4a/pulls/698","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/slapperwan/gh4a/pulls/comments/140671600"},"html":{"href":"https://github.com/slapperwan/gh4a/pull/698#discussion_r140671600"},"pull_request":{"href":"https://api.github.com/repos/slapperwan/gh4a/pulls/698"}},"in_reply_to_id":140655023},"pull_request":{"url":"https://api.github.com/repos/slapperwan/gh4a/pulls/698","id":139941126,"html_url":"https://github.com/slapperwan/gh4a/pull/698","diff_url":"https://github.com/slapperwan/gh4a/pull/698.diff","patch_url":"https://github.com/slapperwan/gh4a/pull/698.patch","issue_url":"https://api.github.com/repos/slapperwan/gh4a/issues/698","number":698,"state":"open","locked":false,"title":"Repository fragment rx refactor","user":{"login":"MattiaPrimavera","id":11927970,"avatar_url":"https://avatars1.githubusercontent.com/u/11927970?v=4","gravatar_id":"","url":"https://api.github.com/users/MattiaPrimavera","html_url":"https://github.com/MattiaPrimavera","followers_url":"https://api.github.com/users/MattiaPrimavera/followers","following_url":"https://api.github.com/users/MattiaPrimavera/following{/other_user}","gists_url":"https://api.github.com/users/MattiaPrimavera/gists{/gist_id}","starred_url":"https://api.github.com/users/MattiaPrimavera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattiaPrimavera/subscriptions","organizations_url":"https://api.github.com/users/MattiaPrimavera/orgs","repos_url":"https://api.github.com/users/MattiaPrimavera/repos","events_url":"https://api.github.com/users/MattiaPrimavera/events{/privacy}","received_events_url":"https://api.github.com/users/MattiaPrimavera/received_events","type":"User","site_admin":false},"body":"Newly **introduced** : \r\n- `rxJava2`\r\n- `rxAndroid`\r\n- `retrolambda` \r\n\r\n**removed** classes : \r\n- `FillReadmeTask`\r\n- `ReadmeLoader` \r\n\r\n`FillReadmeTask` has been replaced by asynchronous operation concatenation from `flatMap` operator (`rxJava2`) while `ReadmeLoader` has been removed in favour of `RepositoryService`. \r\n\r\nThe newly created `service` package is meant to gather `Service` classes, each one wrapping `data loading logic` that is currently contained into `Loaders`. This would have the advantage of reducing the number of `Loader` and `AsyncTask` classes used, plus it would `group` asynchronous data fetch processes by `Fragment`, instead of by `Data`. \r\n\r\nThis would make the program logic easier to follow in my opinion, since `background services` populating the `view` would be all declared in one `Service` class, instead of multiple `Loader` and `AsyncTask` classes.","created_at":"2017-09-08T02:06:26Z","updated_at":"2017-09-24T23:55:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/slapperwan/gh4a/pulls/698/commits","review_comments_url":"https://api.github.com/repos/slapperwan/gh4a/pulls/698/comments","review_comment_url":"https://api.github.com/repos/slapperwan/gh4a/pulls/comments{/number}","comments_url":"https://api.github.com/repos/slapperwan/gh4a/issues/698/comments","statuses_url":"https://api.github.com/repos/slapperwan/gh4a/statuses/bf34c348581178c7d570f2251596ca06bc734a53","head":{"label":"MattiaPrimavera:repository_fragment_rx_refactor","ref":"repository_fragment_rx_refactor","sha":"bf34c348581178c7d570f2251596ca06bc734a53","user":{"login":"MattiaPrimavera","id":11927970,"avatar_url":"https://avatars1.githubusercontent.com/u/11927970?v=4","gravatar_id":"","url":"https://api.github.com/users/MattiaPrimavera","html_url":"https://github.com/MattiaPrimavera","followers_url":"https://api.github.com/users/MattiaPrimavera/followers","following_url":"https://api.github.com/users/MattiaPrimavera/following{/other_user}","gists_url":"https://api.github.com/users/MattiaPrimavera/gists{/gist_id}","starred_url":"https://api.github.com/users/MattiaPrimavera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattiaPrimavera/subscriptions","organizations_url":"https://api.github.com/users/MattiaPrimavera/orgs","repos_url":"https://api.github.com/users/MattiaPrimavera/repos","events_url":"https://api.github.com/users/MattiaPrimavera/events{/privacy}","received_events_url":"https://api.github.com/users/MattiaPrimavera/received_events","type":"User","site_admin":false},"repo":{"id":100855525,"name":"gh4a","full_name":"MattiaPrimavera/gh4a","owner":{"login":"MattiaPrimavera","id":11927970,"avatar_url":"https://avatars1.githubusercontent.com/u/11927970?v=4","gravatar_id":"","url":"https://api.github.com/users/MattiaPrimavera","html_url":"https://github.com/MattiaPrimavera","followers_url":"https://api.github.com/users/MattiaPrimavera/followers","following_url":"https://api.github.com/users/MattiaPrimavera/following{/other_user}","gists_url":"https://api.github.com/users/MattiaPrimavera/gists{/gist_id}","starred_url":"https://api.github.com/users/MattiaPrimavera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattiaPrimavera/subscriptions","organizations_url":"https://api.github.com/users/MattiaPrimavera/orgs","repos_url":"https://api.github.com/users/MattiaPrimavera/repos","events_url":"https://api.github.com/users/MattiaPrimavera/events{/privacy}","received_events_url":"https://api.github.com/users/MattiaPrimavera/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MattiaPrimavera/gh4a","description":"Github client for Android","fork":true,"url":"https://api.github.com/repos/MattiaPrimavera/gh4a","forks_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/forks","keys_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/teams","hooks_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/hooks","issue_events_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/issues/events{/number}","events_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/events","assignees_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/assignees{/user}","branches_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/branches{/branch}","tags_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/tags","blobs_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/git/refs{/sha}","trees_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/statuses/{sha}","languages_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/languages","stargazers_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/stargazers","contributors_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/contributors","subscribers_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/subscribers","subscription_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/subscription","commits_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/commits{/sha}","git_commits_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/git/commits{/sha}","comments_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/comments{/number}","issue_comment_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/issues/comments{/number}","contents_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/contents/{+path}","compare_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/merges","archive_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/downloads","issues_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/issues{/number}","pulls_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/pulls{/number}","milestones_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/milestones{/number}","notifications_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/labels{/name}","releases_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/releases{/id}","deployments_url":"https://api.github.com/repos/MattiaPrimavera/gh4a/deployments","created_at":"2017-08-20T10:59:15Z","updated_at":"2017-08-20T10:59:18Z","pushed_at":"2017-09-23T21:52:32Z","git_url":"git://github.com/MattiaPrimavera/gh4a.git","ssh_url":"git@github.com:MattiaPrimavera/gh4a.git","clone_url":"https://github.com/MattiaPrimavera/gh4a.git","svn_url":"https://github.com/MattiaPrimavera/gh4a","homepage":"","size":17757,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"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":"slapperwan:master","ref":"master","sha":"a9b3cfbe42bf582de0747455311db7aab140bf17","user":{"login":"slapperwan","id":573807,"avatar_url":"https://avatars2.githubusercontent.com/u/573807?v=4","gravatar_id":"","url":"https://api.github.com/users/slapperwan","html_url":"https://github.com/slapperwan","followers_url":"https://api.github.com/users/slapperwan/followers","following_url":"https://api.github.com/users/slapperwan/following{/other_user}","gists_url":"https://api.github.com/users/slapperwan/gists{/gist_id}","starred_url":"https://api.github.com/users/slapperwan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slapperwan/subscriptions","organizations_url":"https://api.github.com/users/slapperwan/orgs","repos_url":"https://api.github.com/users/slapperwan/repos","events_url":"https://api.github.com/users/slapperwan/events{/privacy}","received_events_url":"https://api.github.com/users/slapperwan/received_events","type":"User","site_admin":false},"repo":{"id":1388190,"name":"gh4a","full_name":"slapperwan/gh4a","owner":{"login":"slapperwan","id":573807,"avatar_url":"https://avatars2.githubusercontent.com/u/573807?v=4","gravatar_id":"","url":"https://api.github.com/users/slapperwan","html_url":"https://github.com/slapperwan","followers_url":"https://api.github.com/users/slapperwan/followers","following_url":"https://api.github.com/users/slapperwan/following{/other_user}","gists_url":"https://api.github.com/users/slapperwan/gists{/gist_id}","starred_url":"https://api.github.com/users/slapperwan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slapperwan/subscriptions","organizations_url":"https://api.github.com/users/slapperwan/orgs","repos_url":"https://api.github.com/users/slapperwan/repos","events_url":"https://api.github.com/users/slapperwan/events{/privacy}","received_events_url":"https://api.github.com/users/slapperwan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/slapperwan/gh4a","description":"Github client for Android","fork":false,"url":"https://api.github.com/repos/slapperwan/gh4a","forks_url":"https://api.github.com/repos/slapperwan/gh4a/forks","keys_url":"https://api.github.com/repos/slapperwan/gh4a/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slapperwan/gh4a/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slapperwan/gh4a/teams","hooks_url":"https://api.github.com/repos/slapperwan/gh4a/hooks","issue_events_url":"https://api.github.com/repos/slapperwan/gh4a/issues/events{/number}","events_url":"https://api.github.com/repos/slapperwan/gh4a/events","assignees_url":"https://api.github.com/repos/slapperwan/gh4a/assignees{/user}","branches_url":"https://api.github.com/repos/slapperwan/gh4a/branches{/branch}","tags_url":"https://api.github.com/repos/slapperwan/gh4a/tags","blobs_url":"https://api.github.com/repos/slapperwan/gh4a/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slapperwan/gh4a/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slapperwan/gh4a/git/refs{/sha}","trees_url":"https://api.github.com/repos/slapperwan/gh4a/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slapperwan/gh4a/statuses/{sha}","languages_url":"https://api.github.com/repos/slapperwan/gh4a/languages","stargazers_url":"https://api.github.com/repos/slapperwan/gh4a/stargazers","contributors_url":"https://api.github.com/repos/slapperwan/gh4a/contributors","subscribers_url":"https://api.github.com/repos/slapperwan/gh4a/subscribers","subscription_url":"https://api.github.com/repos/slapperwan/gh4a/subscription","commits_url":"https://api.github.com/repos/slapperwan/gh4a/commits{/sha}","git_commits_url":"https://api.github.com/repos/slapperwan/gh4a/git/commits{/sha}","comments_url":"https://api.github.com/repos/slapperwan/gh4a/comments{/number}","issue_comment_url":"https://api.github.com/repos/slapperwan/gh4a/issues/comments{/number}","contents_url":"https://api.github.com/repos/slapperwan/gh4a/contents/{+path}","compare_url":"https://api.github.com/repos/slapperwan/gh4a/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slapperwan/gh4a/merges","archive_url":"https://api.github.com/repos/slapperwan/gh4a/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slapperwan/gh4a/downloads","issues_url":"https://api.github.com/repos/slapperwan/gh4a/issues{/number}","pulls_url":"https://api.github.com/repos/slapperwan/gh4a/pulls{/number}","milestones_url":"https://api.github.com/repos/slapperwan/gh4a/milestones{/number}","notifications_url":"https://api.github.com/repos/slapperwan/gh4a/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slapperwan/gh4a/labels{/name}","releases_url":"https://api.github.com/repos/slapperwan/gh4a/releases{/id}","deployments_url":"https://api.github.com/repos/slapperwan/gh4a/deployments","created_at":"2011-02-20T02:47:49Z","updated_at":"2017-09-24T19:01:01Z","pushed_at":"2017-09-24T13:25:37Z","git_url":"git://github.com/slapperwan/gh4a.git","ssh_url":"git@github.com:slapperwan/gh4a.git","clone_url":"https://github.com/slapperwan/gh4a.git","svn_url":"https://github.com/slapperwan/gh4a","homepage":"","size":18023,"stargazers_count":815,"watchers_count":815,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":154,"mirror_url":null,"open_issues_count":104,"forks":154,"open_issues":104,"watchers":815,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/slapperwan/gh4a/pulls/698"},"html":{"href":"https://github.com/slapperwan/gh4a/pull/698"},"issue":{"href":"https://api.github.com/repos/slapperwan/gh4a/issues/698"},"comments":{"href":"https://api.github.com/repos/slapperwan/gh4a/issues/698/comments"},"review_comments":{"href":"https://api.github.com/repos/slapperwan/gh4a/pulls/698/comments"},"review_comment":{"href":"https://api.github.com/repos/slapperwan/gh4a/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/slapperwan/gh4a/pulls/698/commits"},"statuses":{"href":"https://api.github.com/repos/slapperwan/gh4a/statuses/bf34c348581178c7d570f2251596ca06bc734a53"}},"author_association":"NONE"}}
{"actor":{"display_login":"MattiaPrimavera"}}