public EditStateTask edit(boolean close) {
        int message = close ? R.string.closing_issue : R.string.reopening_issue;
        IssueState state = close ? IssueState.Closed : IssueState.Open;

        try {
            store.changeState(repository, issueNumber, state)
                    .subscribeOn(Schedulers.io())
                    .observeOn(AndroidSchedulers.mainThread())
                    .compose(RxProgress.bindToLifecycle(activity, message))
                    .as(AutoDisposeUtils.bindToLifecycle(activity))
                    .subscribe(observer);
        } catch (Exception e) {
            e.printStackTrace();
        }

        return this;
    }
Edit state of issue.

@param close
@return this task
app/src/main/java/com/github/pockethub/android/ui/issue/EditStateTask.java