Я хочу отобразить AlertDialog
в моем View
, показывающем, что результат был успешным,
private void actionUpdateProfesional() {
btnSave.setOnClickListener(view -> {
alertDialog = new AlertDialog.Builder(this)
.setTitle("Wait!")
.setMessage("Are you sure you want update your data?")
.setPositiveButton("YES", (dialogInterface, i) -> presenter.updateProfile())
.setNegativeButton("NO", null)
.create();
alertDialog.show();
});
}
после того, как мой Completable
был выполнен на моем докладчике:
@Override
public void updateProfile() {
Disposable d = updateInfoInteractor
.build(new ProfileUpdateInfoInteractor.Param(view.getPhone(), view.getLocation(), view.getDescription()))
.observeOn(schedulers.main())
.subscribeWith(new DisposableCompletableObserver() {
@Override
public void onComplete() {
Timber.d("Profile edited");
}
@Override
public void onError(Throwable e) {
Timber.d("Error at edit profile");
}
});
}