Disable the drawer and reset the nav when the user logs out or switches accounts
This commit is contained in:
@@ -68,6 +68,8 @@ export const SettingsScreen = withAuthRequired(
|
||||
}
|
||||
const onPressAddAccount = () => {
|
||||
track('Settings:AddAccountButtonClicked')
|
||||
navigation.navigate('HomeTab')
|
||||
navigation.dispatch(StackActions.popToTop())
|
||||
store.session.clear()
|
||||
}
|
||||
const onPressChangeHandle = () => {
|
||||
|
||||
@@ -46,7 +46,7 @@ const ShellInner = observer(() => {
|
||||
onOpen={onOpenDrawer}
|
||||
onClose={onCloseDrawer}
|
||||
swipeEdgeWidth={winDim.width}
|
||||
swipeEnabled={!canGoBack}>
|
||||
swipeEnabled={!canGoBack && store.session.hasSession}>
|
||||
<TabsNavigator />
|
||||
</Drawer>
|
||||
</ErrorBoundary>
|
||||
|
||||
Reference in New Issue
Block a user