Make all "Log out" buttons refer to current account

Each of these usages is completely contextual and refers to a specific account.
This commit is contained in:
Dan Abramov
2024-08-15 01:34:18 +01:00
parent 10a6a5fd24
commit 02ab29362a
4 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -77,7 +77,7 @@ function SettingsAccountCard({
const {_} = useLingui()
const t = useTheme()
const {currentAccount} = useSession()
const {logoutEveryAccount} = useSessionApi()
const {logoutCurrentAccount} = useSessionApi()
const {data: profile} = useProfileQuery({did: account.did})
const isCurrentAccount = account.did === currentAccount?.did
@@ -109,11 +109,11 @@ function SettingsAccountCard({
testID="signOutBtn"
onPress={() => {
if (isNative) {
logoutEveryAccount('Settings')
logoutCurrentAccount('Settings')
resetToTab('HomeTab')
} else {
navigate('Home').then(() => {
logoutEveryAccount('Settings')
logoutCurrentAccount('Settings')
})
}
}}