mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
Fix removals
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
5d9f4456ed
commit
db96e94a60
@ -320,22 +320,32 @@ public class SettingsController extends BaseController {
|
|||||||
dispose(profileQueryDisposable);
|
dispose(profileQueryDisposable);
|
||||||
}, () -> dispose(profileQueryDisposable));
|
}, () -> dispose(profileQueryDisposable));
|
||||||
|
|
||||||
|
removeAccountButton.setEnabled(true);
|
||||||
|
|
||||||
removeAccountButton.setOnClickListener(view1 -> {
|
removeAccountButton.setOnClickListener(view1 -> {
|
||||||
|
removeAccountButton.setEnabled(false);
|
||||||
cookieManager.getCookieStore().removeAll();
|
cookieManager.getCookieStore().removeAll();
|
||||||
boolean otherUserExists = userUtils.scheduleUserForDeletionWithId(userEntity.getId());
|
boolean otherUserExists = userUtils.scheduleUserForDeletionWithId(userEntity.getId());
|
||||||
|
new JobRequest.Builder(AccountRemovalJob.TAG).setUpdateCurrent(true)
|
||||||
|
.startNow().build().schedule();
|
||||||
|
|
||||||
if (otherUserExists && getView() != null) {
|
if (otherUserExists && getView() != null) {
|
||||||
onViewBound(getView());
|
onViewBound(getView());
|
||||||
onAttach(getView());
|
onAttach(getView());
|
||||||
} else if (!otherUserExists) {
|
} else if (!otherUserExists) {
|
||||||
getParentController().getRouter().setRoot(RouterTransaction.with(
|
if (getParentController() == null || getParentController().getRouter() == null) {
|
||||||
new ServerSelectionController())
|
if (getActivity() != null) {
|
||||||
.pushChangeHandler(new VerticalChangeHandler())
|
// Something went very wrong, finish the app
|
||||||
.popChangeHandler(new VerticalChangeHandler()));
|
getActivity().finish();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
getParentController().getRouter().setRoot(RouterTransaction.with(
|
||||||
|
new ServerSelectionController())
|
||||||
|
.pushChangeHandler(new VerticalChangeHandler())
|
||||||
|
.popChangeHandler(new VerticalChangeHandler()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
new JobRequest.Builder(AccountRemovalJob.TAG).setUpdateCurrent(true)
|
|
||||||
.startNow().build().schedule();
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user