diff options
author | Eric Bailey <git@esb.lol> | 2023-12-07 15:44:59 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 13:44:59 -0800 |
commit | b7a529412381c51f958b5f69e16b8f233e203ec2 (patch) | |
tree | 21b2bbc5f854735dfec9f07a2f866fcbd154b411 /src/lib/hooks | |
parent | 174a1622c9dc34d580d3deb1f52f85aec4ac9f42 (diff) | |
download | voidsky-b7a529412381c51f958b5f69e16b8f233e203ec2.tar.zst |
Improve account switching on mobile (#2135)
* Improve account switching on mobile * Clarify comment
Diffstat (limited to 'src/lib/hooks')
-rw-r--r-- | src/lib/hooks/useAccountSwitcher.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/hooks/useAccountSwitcher.ts b/src/lib/hooks/useAccountSwitcher.ts index 8a1dea5fe..f67a586ef 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) |