taverna-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sagar15795 <...@git.apache.org>
Subject [GitHub] incubator-taverna-mobile pull request #56: Migration RxJava 1 -> RxJava2
Date Tue, 20 Feb 2018 04:14:52 GMT
Github user sagar15795 commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/56#discussion_r169214143
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/workflowdetail/WorkflowDetailPresenter.java
---
    @@ -155,28 +155,21 @@ public void onError(Throwable e) {
                         }
     
                         @Override
    -                    public void onNext(Boolean b) {
    -                        if (b) {
    -                            getMvpView().setFavouriteIcon();
    -                        } else {
    -                            getMvpView().showErrorSnackBar("Something went wrong please
try after" +
    -                                    "sometime");
    -                        }
    +                    public void onComplete() {
     
                         }
                     }));
         }
     
         public void getFavourite(String id) {
    -
    -
    -        mCompositeSubscription.add(mDataManager.getFavoriteWorkflow(id)
    +        checkViewAttached();
    +        compositeDisposable.add(mDataManager.getFavoriteWorkflow(id)
                     .observeOn(AndroidSchedulers.mainThread())
                     .subscribeOn(Schedulers.io())
    -                .subscribe(new Observer<Boolean>() {
    +                .subscribeWith(new DisposableObserver<Boolean>() {
                         @Override
    -                    public void onCompleted() {
    -
    +                    public void onNext(Boolean b) {
    --- End diff --
    
    This Boolean `b` name should be `favoriteStatus`


---

Mime
View raw message