From 16f9939d15f8d39f1ff59888bbcbf7b9599257f2 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 15 Aug 2024 02:26:49 +0100 Subject: [PATCH] Move single account Sign Out below as well --- src/view/screens/Settings/index.tsx | 68 ++++++++++------------------- 1 file changed, 22 insertions(+), 46 deletions(-) diff --git a/src/view/screens/Settings/index.tsx b/src/view/screens/Settings/index.tsx index 3b17997bcb..a38965133f 100644 --- a/src/view/screens/Settings/index.tsx +++ b/src/view/screens/Settings/index.tsx @@ -57,7 +57,6 @@ import {DeactivateAccountDialog} from '#/screens/Settings/components/DeactivateA import {atoms as a, useTheme} from '#/alf' import {useDialogControl} from '#/components/Dialog' import {BirthDateSettingsDialog} from '#/components/dialogs/BirthDateSettings' -import {navigate, resetToTab} from '#/Navigation' import {Email2FAToggle} from './Email2FAToggle' import {ExportCarDialog} from './ExportCarDialog' @@ -77,7 +76,6 @@ function SettingsAccountCard({ const {_} = useLingui() const t = useTheme() const {currentAccount} = useSession() - const {logoutCurrentAccount} = useSessionApi() const {data: profile} = useProfileQuery({did: account.did}) const isCurrentAccount = account.did === currentAccount?.did @@ -103,31 +101,7 @@ function SettingsAccountCard({ {account.handle} - - {isCurrentAccount ? ( - { - if (isNative) { - logoutCurrentAccount('Settings') - resetToTab('HomeTab') - } else { - navigate('Home').then(() => { - logoutCurrentAccount('Settings') - }) - } - }} - accessibilityRole="button" - accessibilityLabel={_(msg`Sign out`)} - accessibilityHint={`Signs ${profile?.displayName} out of Bluesky`} - activeOpacity={0.8}> - - Sign out - - - ) : ( - - )} + ) @@ -428,26 +402,28 @@ export function SettingsScreen({}: Props) { - {accounts.length > 1 && ( - - - - - + + + + + + {accounts.length > 1 ? ( Sign out of all accounts - - - )} + ) : ( + Sign out + )} + +