about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-12-07 15:44:59 -0600
committerGitHub <noreply@github.com>2023-12-07 13:44:59 -0800
commitb7a529412381c51f958b5f69e16b8f233e203ec2 (patch)
tree21b2bbc5f854735dfec9f07a2f866fcbd154b411 /src
parent174a1622c9dc34d580d3deb1f52f85aec4ac9f42 (diff)
downloadvoidsky-b7a529412381c51f958b5f69e16b8f233e203ec2.tar.zst
Improve account switching on mobile (#2135)
* Improve account switching on mobile

* Clarify comment
Diffstat (limited to 'src')
-rw-r--r--src/lib/hooks/useAccountSwitcher.ts10
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)