Fix a crash

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-05-07 19:39:04 +02:00
parent f969655f4e
commit 3a58a65bc7

View File

@ -449,35 +449,27 @@ public class AccountVerificationController extends BaseController {
} else {
ApplicationWideMessageHolder.getInstance().setMessageType(
ApplicationWideMessageHolder.MessageType.FAILED_TO_IMPORT_ACCOUNT);
new Handler().postDelayed(() -> {
if (getActivity() != null) {
getActivity().runOnUiThread(() -> new Handler().postDelayed(() -> {
if (getRouter().hasRootController()) {
if (getActivity() != null) {
getActivity().runOnUiThread(() -> {
getRouter().popToRoot();
});
}
} else {
if (userUtils.anyUserExists()) {
if (getActivity() != null) {
getActivity().runOnUiThread(() -> {
getRouter().setRoot(RouterTransaction.with(new MagicBottomNavigationController())
.pushChangeHandler(new HorizontalChangeHandler())
.popChangeHandler(new HorizontalChangeHandler()));
});
}
} else {
if (getActivity() != null) {
getActivity().runOnUiThread(() -> {
getRouter().setRoot(RouterTransaction.with(new ServerSelectionController())
.pushChangeHandler(new HorizontalChangeHandler())
.popChangeHandler(new HorizontalChangeHandler()));
});
}
}
}, 7500));
}
}, 7500);
}
}