Improve account switching on mobile (#2135)
* Improve account switching on mobile * Clarify commentzio/stable
parent
174a1622c9
commit
b7a5294123
|
@ -23,8 +23,16 @@ export function useAccountSwitcher() {
|
||||||
try {
|
try {
|
||||||
if (account.accessJwt) {
|
if (account.accessJwt) {
|
||||||
closeAllActiveElements()
|
closeAllActiveElements()
|
||||||
navigation.navigate(isWeb ? 'Home' : 'HomeTab')
|
|
||||||
await selectAccount(account)
|
await selectAccount(account)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mobile resets to Home on its own, so no need to handle mobile
|
||||||
|
* specifically.
|
||||||
|
*/
|
||||||
|
if (isWeb) {
|
||||||
|
navigation.navigate('Home')
|
||||||
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
Toast.show(`Signed in as @${account.handle}`)
|
Toast.show(`Signed in as @${account.handle}`)
|
||||||
}, 100)
|
}, 100)
|
||||||
|
|
Loading…
Reference in New Issue