Fix account removal if it’s the last account

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2019-04-18 01:56:14 +02:00
parent b335d34e18
commit b7dec6e4fa

View File

@ -406,17 +406,10 @@ public class SettingsController extends BaseController {
onViewBound(getView());
onAttach(getView());
} else if (!otherUserExists) {
if (getParentController() == null || getParentController().getRouter() == null) {
if (getActivity() != null) {
// Something went very wrong, finish the app
getActivity().finish();
}
} else {
getParentController().getRouter().setRoot(RouterTransaction.with(
new ServerSelectionController())
.pushChangeHandler(new VerticalChangeHandler())
.popChangeHandler(new VerticalChangeHandler()));
}
getRouter().setRoot(RouterTransaction.with(
new ServerSelectionController())
.pushChangeHandler(new VerticalChangeHandler())
.popChangeHandler(new VerticalChangeHandler()));
}
}