From b7a529412381c51f958b5f69e16b8f233e203ec2 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 7 Dec 2023 15:44:59 -0600 Subject: [PATCH] Improve account switching on mobile (#2135) * Improve account switching on mobile * Clarify comment --- src/lib/hooks/useAccountSwitcher.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/hooks/useAccountSwitcher.ts b/src/lib/hooks/useAccountSwitcher.ts index 8a1dea5f..f67a586e 100644 --- a/src/lib/hooks/useAccountSwitcher.ts +++ b/src/lib/hooks/useAccountSwitcher.ts @@ -23,8 +23,16 @@ export function useAccountSwitcher() { try { if (account.accessJwt) { closeAllActiveElements() - navigation.navigate(isWeb ? 'Home' : 'HomeTab') await selectAccount(account) + + /* + * Mobile resets to Home on its own, so no need to handle mobile + * specifically. + */ + if (isWeb) { + navigation.navigate('Home') + } + setTimeout(() => { Toast.show(`Signed in as @${account.handle}`) }, 100)