fix crash when logging out active account
This commit is contained in:
parent
2858aeb55e
commit
5e7a00de3e
|
@ -194,8 +194,16 @@ public class AccountSwitcherSheet extends BottomSheet{
|
||||||
|
|
||||||
private void onLoggedOut(String accountID){
|
private void onLoggedOut(String accountID){
|
||||||
AccountSessionManager.getInstance().removeAccount(accountID);
|
AccountSessionManager.getInstance().removeAccount(accountID);
|
||||||
|
String activeAccountID = fragment != null
|
||||||
|
? fragment.getAccountID()
|
||||||
|
: AccountSessionManager.getInstance().getLastActiveAccountID();
|
||||||
|
if (accountID.equals(activeAccountID)) {
|
||||||
|
activity.finish();
|
||||||
|
activity.startActivity(new Intent(activity, MainActivity.class));
|
||||||
|
} else {
|
||||||
dismiss();
|
dismiss();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onWindowInsetsUpdated(WindowInsets insets){
|
protected void onWindowInsetsUpdated(WindowInsets insets){
|
||||||
|
|
Loading…
Reference in New Issue