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
This commit is contained in:
parent
aeed4786db
commit
85b34418ef
4 changed files with 64 additions and 62 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue