public void fetchCustomerDepositAccounts()

in app/src/main/java/org/apache/fineract/ui/online/depositaccounts/depositaccountslist/DepositAccountsPresenter.java [52:82]


    public void fetchCustomerDepositAccounts(String customerIdentifier) {
        checkViewAttached();
        getMvpView().showProgressbar();
        compositeDisposable.add(dataManagerDeposit.getCustomerDepositAccounts(customerIdentifier)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeWith(new DisposableObserver<List<DepositAccount>>() {
                    @Override
                    public void onNext(List<DepositAccount> customerDepositAccounts) {
                        getMvpView().hideProgressbar();
                        if (!customerDepositAccounts.isEmpty()) {
                            getMvpView().showCustomerDeposits(customerDepositAccounts);
                        } else {
                            getMvpView().showEmptyDepositAccounts();
                        }
                    }

                    @Override
                    public void onError(Throwable throwable) {
                        getMvpView().hideProgressbar();
                        showExceptionError(throwable,
                                context.getString(R.string.error_fetching_deposit_accounts));
                    }

                    @Override
                    public void onComplete() {

                    }
                })
        );
    }