fix(account-sheet): properly check if the account is active

I LOVE RACE CONDITIONS :D
This commit is contained in:
LucasGGamerM 2024-06-25 16:52:45 -03:00
parent f8dbecc3e1
commit e8ce2a7e35
1 changed files with 1 additions and 1 deletions

View File

@ -340,7 +340,7 @@ public class AccountSwitcherSheet extends BottomSheet{
return;
}
AccountSessionManager accountSessionManager=AccountSessionManager.getInstance();
if(accountSessionManager.tryGetAccount(item.getID())!=null && !Objects.equals(accountSessionManager.getLastActiveAccountID(), item.getID())){
if(accountSessionManager.tryGetAccount(item.getID())!=null && !view.isChecked()){
AccountSessionManager.getInstance().setLastActiveAccountID(item.getID());
((MainActivity)activity).restartActivity();
}