diff options
author | dan <dan.abramov@gmail.com> | 2024-05-02 21:55:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-02 21:55:50 +0100 |
commit | b86c3b486f2e126fe887733c9e8ef6856cd67e91 (patch) | |
tree | 3d96f1decb6649af910ec146fb73ce88538cb9fe /src/components/dialogs/SwitchAccount.tsx | |
parent | 8ba1b10ce0d278a88e37d6b6c277a41673392877 (diff) | |
download | voidsky-b86c3b486f2e126fe887733c9e8ef6856cd67e91.tar.zst |
Improve account switcher pending state (#3827)
* Protect against races * Reduce UI jank when switching accounts * Add pending state to selected account * Disable presses while pending
Diffstat (limited to 'src/components/dialogs/SwitchAccount.tsx')
-rw-r--r-- | src/components/dialogs/SwitchAccount.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/dialogs/SwitchAccount.tsx b/src/components/dialogs/SwitchAccount.tsx index 18fc55aaf..0bd4bcb8c 100644 --- a/src/components/dialogs/SwitchAccount.tsx +++ b/src/components/dialogs/SwitchAccount.tsx @@ -18,7 +18,7 @@ export function SwitchAccountDialog({ }) { const {_} = useLingui() const {currentAccount} = useSession() - const {onPressSwitchAccount, isSwitchingAccounts} = useAccountSwitcher() + const {onPressSwitchAccount, pendingDid} = useAccountSwitcher() const {setShowLoggedOut} = useLoggedOutViewControls() const onSelectAccount = useCallback( @@ -54,7 +54,7 @@ export function SwitchAccountDialog({ onSelectAccount={onSelectAccount} onSelectOther={onPressAddAccount} otherLabel={_(msg`Add account`)} - isSwitchingAccounts={isSwitchingAccounts} + pendingDid={pendingDid} /> </View> </Dialog.ScrollableInner> |