in app/src/main/java/org/apache/fineract/ui/online/customers/customeractivities/CustomerActivitiesPresenter.java [52:83]
public void fetchCustomerCommands(String customerIdentifier) {
checkViewAttached();
getMvpView().showProgressbar();
compositeDisposable.add(dataManagerCustomer.fetchCustomerCommands(customerIdentifier)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribeWith(new DisposableObserver<List<Command>>() {
@Override
public void onNext(List<Command> commands) {
getMvpView().hideProgressbar();
if (!commands.isEmpty()) {
getMvpView().showCustomerCommands(commands);
} else {
getMvpView().showEmptyCommands(
context.getString(R.string.empty_customer_activities));
}
}
@Override
public void onError(Throwable throwable) {
getMvpView().hideProgressbar();
showExceptionError(throwable,
context.getString(R.string.error_fetching_customer_activities));
}
@Override
public void onComplete() {
}
})
);
}