diff --git a/src/Navigation.tsx b/src/Navigation.tsx
index 817d69e332..f354ecbe7a 100644
--- a/src/Navigation.tsx
+++ b/src/Navigation.tsx
@@ -136,7 +136,7 @@ import {
EmailDialogScreenID,
useEmailDialogControl,
} from '#/components/dialogs/EmailDialog'
-import {AnalyticsContext, useAnalytics, utils} from '#/analytics'
+import {useAnalytics} from '#/analytics'
import {IS_NATIVE, IS_WEB} from '#/env'
import {router} from '#/routes'
import {Referrer} from '../modules/expo-bluesky-swiss-army'
@@ -1065,15 +1065,7 @@ function RoutesContainer({children}: React.PropsWithChildren<{}>) {
// We will need to confirm we handle nested navigators correctly by the time we migrate to React Navigation 8.x
// -sfn
navigationInChildEnabled>
-
- {children}
-
+ {children}
)
}
diff --git a/src/view/shell/createNativeStackNavigatorWithAuth.tsx b/src/view/shell/createNativeStackNavigatorWithAuth.tsx
index 76f4f19ac0..6ce2dd3eef 100644
--- a/src/view/shell/createNativeStackNavigatorWithAuth.tsx
+++ b/src/view/shell/createNativeStackNavigatorWithAuth.tsx
@@ -37,6 +37,7 @@ import {Onboarding} from '#/screens/Onboarding'
import {SignupQueued} from '#/screens/SignupQueued'
import {atoms as a, useLayoutBreakpoints} from '#/alf'
import {PolicyUpdateOverlay} from '#/components/PolicyUpdateOverlay'
+import {AnalyticsContext, utils} from '#/analytics'
import {IS_NATIVE, IS_WEB} from '#/env'
import {BottomBarWeb} from './bottom-bar/BottomBarWeb'
import {DesktopLeftNav} from './desktop/LeftNav'
@@ -114,6 +115,11 @@ function NativeStackNavigator({
const {setShowLoggedOut} = useLoggedOutViewControls()
const {isMobile} = useWebMediaQueries()
const {leftNavMinimal} = useLayoutBreakpoints()
+ const prevActiveRouteName = React.useRef(undefined)
+ React.useEffect(() => {
+ prevActiveRouteName.current = activeRoute.name
+ }, [activeRoute.name])
+
if (!hasSession && (activeRouteRequiresAuth || IS_NATIVE)) {
return
}
@@ -148,24 +154,32 @@ function NativeStackNavigator({
return (
-
-
-
- {IS_WEB && (
- <>
- {showBottomBar ? : }
- {!isMobile && }
- >
- )}
+
+
+
+
+ {IS_WEB && (
+ <>
+ {showBottomBar ? : }
+ {!isMobile && }
+ >
+ )}
- {/* Only shown after logged in and onboaring etc are complete */}
- {hasSession && }
+ {/* Only shown after logged in and onboaring etc are complete */}
+ {hasSession && }
+
)
}