in app/src/main/java/org/apache/fineract/ui/online/identification/identificationlist/IdentificationsPresenter.java [54:85]
public void fetchIdentifications(String customerIdentifier) {
checkViewAttached();
getMvpView().showProgressbar();
compositeDisposable.add(dataManagerCustomer.fetchIdentifications(customerIdentifier)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribeWith(new DisposableObserver<List<Identification>>() {
@Override
public void onNext(List<Identification> identifications) {
getMvpView().hideProgressbar();
if (identifications.size() == 0) {
getMvpView().showEmptyIdentifications();
} else {
getMvpView().showIdentification(identifications);
}
}
@Override
public void onError(Throwable throwable) {
getMvpView().hideProgressbar();
showExceptionError(throwable,
context.getString(R.string.error_fetching_identification_list));
}
@Override
public void onComplete() {
}
})
);
}