From e8ce2a7e3501e6a86a06a3bf4b5d64aebb577636 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Tue, 25 Jun 2024 16:52:45 -0300 Subject: [PATCH] fix(account-sheet): properly check if the account is active I LOVE RACE CONDITIONS :D --- .../joinmastodon/android/ui/sheets/AccountSwitcherSheet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/sheets/AccountSwitcherSheet.java b/mastodon/src/main/java/org/joinmastodon/android/ui/sheets/AccountSwitcherSheet.java index 55cf1eb1d..71646249e 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/sheets/AccountSwitcherSheet.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/sheets/AccountSwitcherSheet.java @@ -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(); }