From ec5c4929c1c5677d22c923193ce04f3d69b72711 Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Fri, 12 Apr 2024 14:13:13 -0700
Subject: PWI improvements (#3489)

* Enable home and feeds on the PWI

* Add global SigninDialog to drive useRequireAuth()

* Tweak desktop styles

* Make the logo in leftnav PWI a clickable home link

* Add label

* Improve dialog on web

* Fix query key

* Go to home after signout from settings screen

* Filter out feeds from the discover listing for logged out users which are known to break without auth

* Update profile header follow/subscribe to give signin prompt

* Show profile feeds tabs on pwi

* Add language selector to account creation footer and pwi left nav desktop

---------

Co-authored-by: dan <dan.abramov@gmail.com>
---
 src/view/screens/Settings/index.tsx | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'src/view/screens/Settings/index.tsx')

diff --git a/src/view/screens/Settings/index.tsx b/src/view/screens/Settings/index.tsx
index 8a7fa5e71..b97faafad 100644
--- a/src/view/screens/Settings/index.tsx
+++ b/src/view/screens/Settings/index.tsx
@@ -71,6 +71,7 @@ import {UserAvatar} from 'view/com/util/UserAvatar'
 import {ScrollView} from 'view/com/util/Views'
 import {useDialogControl} from '#/components/Dialog'
 import {BirthDateSettingsDialog} from '#/components/dialogs/BirthDateSettings'
+import {navigate, resetToTab} from '#/Navigation'
 import {ExportCarDialog} from './ExportCarDialog'
 
 function SettingsAccountCard({account}: {account: SessionAccount}) {
@@ -104,7 +105,14 @@ function SettingsAccountCard({account}: {account: SessionAccount}) {
         <TouchableOpacity
           testID="signOutBtn"
           onPress={() => {
-            logout('Settings')
+            if (isNative) {
+              logout('Settings')
+              resetToTab('HomeTab')
+            } else {
+              navigate('Home').then(() => {
+                logout('Settings')
+              })
+            }
           }}
           accessibilityRole="button"
           accessibilityLabel={_(msg`Sign out`)}
-- 
cgit 1.4.1

