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 #87: Added WorkflowPresenter Test
Date Wed, 20 Jun 2018 13:15:50 GMT
Github user sagar15795 commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/87#discussion_r196769008
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/workflow/WorkflowPresenter.java
---
    @@ -72,9 +72,17 @@ public void loadAllWorkflow(int pageNumber) {
                     .subscribeWith(new DisposableObserver<Workflows>() {
                         @Override
                         public void onNext(Workflows workflows) {
    -                        getMvpView().showProgressbar(false);
    -                        getMvpView().removeLoadMoreProgressbar();
    -                        getMvpView().showWorkflows(workflows);
    +                        if (workflows.getWorkflowList() != null) {
    +                            getMvpView().showProgressbar(false);
    +                            getMvpView().removeLoadMoreProgressbar();
    +                            getMvpView().showWorkflows(workflows);
    +                        } else if (workflows.getWorkflowList() == null && pageNumber
== 1) {
    --- End diff --
    
    make the logic this way.
    ```
    else{
    	if(pageNumber == 1){
        	getMvpView().showSnackBar(R.string.no_workflows_found);
    	} else {
    	 getMvpView().showSnackBar(R.string.no_more_workflows_avialable);
    	}
        getMvpView().removeLoadMoreProgressbar();
    } 
    ```


---

Mime
View raw message