From 85b34418ef31247f8d88bdb08248a149192c5b46 Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 3 May 2024 16:36:58 +0100 Subject: Don't clear toasts when changing users (#3843) * Move ThemeProvider to the top * Move RootSiblingParent above the remounted part * Move ToastContainer outside the remounted part * Remove setTimeout around toasts * Consistently handle dropped session --- src/lib/hooks/useAccountSwitcher.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/lib/hooks/useAccountSwitcher.ts') diff --git a/src/lib/hooks/useAccountSwitcher.ts b/src/lib/hooks/useAccountSwitcher.ts index de50e5336..558fcf74b 100644 --- a/src/lib/hooks/useAccountSwitcher.ts +++ b/src/lib/hooks/useAccountSwitcher.ts @@ -41,9 +41,7 @@ export function useAccountSwitcher() { } await initSession(account) logEvent('account:loggedIn', {logContext, withPassword: false}) - setTimeout(() => { - Toast.show(_(msg`Signed in as @${account.handle}`)) - }, 100) + Toast.show(_(msg`Signed in as @${account.handle}`)) } else { requestSwitchToAccount({requestedAccount: account.did}) Toast.show( @@ -56,9 +54,6 @@ export function useAccountSwitcher() { message: e.message, }) clearCurrentAccount() // back user out to login - setTimeout(() => { - Toast.show(_(msg`Sorry! We need you to enter your password.`)) - }, 100) } finally { setPendingDid(null) } -- cgit 1.4.1