about summary refs log tree commit diff
path: root/src/view/screens/Settings.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/screens/Settings.tsx')
-rw-r--r--src/view/screens/Settings.tsx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx
index 010de23db..062533c27 100644
--- a/src/view/screens/Settings.tsx
+++ b/src/view/screens/Settings.tsx
@@ -57,6 +57,7 @@ import {
   useRequireAltTextEnabled,
   useSetRequireAltTextEnabled,
 } from '#/state/preferences'
+import {useSession, useSessionApi} from '#/state/session'
 
 // TEMPORARY (APP-700)
 // remove after backend testing finishes
@@ -87,6 +88,8 @@ export const SettingsScreen = withAuthRequired(
       store.agent,
     )
     const {openModal} = useModalControls()
+    const {logout} = useSessionApi()
+    const {accounts} = useSession()
 
     const primaryBg = useCustomPalette<ViewStyle>({
       light: {backgroundColor: colors.blue0},
@@ -153,8 +156,9 @@ export const SettingsScreen = withAuthRequired(
 
     const onPressSignout = React.useCallback(() => {
       track('Settings:SignOutButtonClicked')
+      logout()
       store.session.logout()
-    }, [track, store])
+    }, [track, store, logout])
 
     const onPressDeleteAccount = React.useCallback(() => {
       openModal({name: 'delete-account'})
@@ -294,7 +298,7 @@ export const SettingsScreen = withAuthRequired(
               </View>
             </Link>
           )}
-          {store.session.switchableAccounts.map(account => (
+          {accounts.map(account => (
             <TouchableOpacity
               testID={`switchToAccountBtn-${account.handle}`}
               key={account.did}
@@ -306,10 +310,11 @@ export const SettingsScreen = withAuthRequired(
               accessibilityLabel={`Switch to ${account.handle}`}
               accessibilityHint="Switches the account you are logged in to">
               <View style={styles.avi}>
-                <UserAvatar size={40} avatar={account.aviUrl} />
+                {/*<UserAvatar size={40} avatar={account.aviUrl} />*/}
               </View>
               <View style={[s.flex1]}>
                 <Text type="md-bold" style={pal.text}>
+                  {/* @ts-ignore */}
                   {account.displayName || account.handle}
                 </Text>
                 <Text type="sm" style={pal.textLight}>