Fix crash when switching accounts

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-05-09 19:37:54 +02:00
parent f97b8c1cdb
commit 245505bb71

View file

@ -111,7 +111,14 @@ public class SwitchAccountController extends BaseController {
public void onNext(UserEntity userEntity) {
cookieManager.getCookieStore().removeAll();
userUtils.disableAllUsersWithoutId(userEntity.getId());
getRouter().popCurrentController();
if (getActivity() != null) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
getRouter().popCurrentController();
}
});
}
}
@Override