diff options
author | Eric Bailey <git@esb.lol> | 2025-08-07 14:55:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-07 14:55:19 -0500 |
commit | 11c9931fd2bc9db8a6e4e71ae04d71051f63191c (patch) | |
tree | ed2de0262a18a8971d23214009afa6bdc172f9c1 /src/view | |
parent | c0593e49792af987b0c7accd6301f235d132030f (diff) | |
download | voidsky-11c9931fd2bc9db8a6e4e71ae04d71051f63191c.tar.zst |
Fix policy overlay logic (#8793)
* Only enable policy update overlay once the actual Overlay mounts (after onboarding and all that) * Disable policy overlay in e2e * Add comments * Add extra insurance * Rm log
Diffstat (limited to 'src/view')
-rw-r--r-- | src/view/shell/index.tsx | 4 | ||||
-rw-r--r-- | src/view/shell/index.web.tsx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/view/shell/index.tsx b/src/view/shell/index.tsx index 0d8c24566..543009a55 100644 --- a/src/view/shell/index.tsx +++ b/src/view/shell/index.tsx @@ -33,7 +33,7 @@ import {MutedWordsDialog} from '#/components/dialogs/MutedWords' import {SigninDialog} from '#/components/dialogs/Signin' import { Outlet as PolicyUpdateOverlayPortalOutlet, - usePolicyUpdateStateContext, + usePolicyUpdateContext, } from '#/components/PolicyUpdateOverlay' import {Outlet as PortalOutlet} from '#/components/Portal' import {RoutesContainer, TabsNavigator} from '#/Navigation' @@ -49,7 +49,7 @@ function ShellInner() { const setIsDrawerOpen = useSetDrawerOpen() const winDim = useWindowDimensions() const insets = useSafeAreaInsets() - const policyUpdateState = usePolicyUpdateStateContext() + const {state: policyUpdateState} = usePolicyUpdateContext() const renderDrawerContent = useCallback(() => <DrawerContent />, []) const onOpenDrawer = useCallback( diff --git a/src/view/shell/index.web.tsx b/src/view/shell/index.web.tsx index c1565e8ee..3c2bc58ab 100644 --- a/src/view/shell/index.web.tsx +++ b/src/view/shell/index.web.tsx @@ -24,7 +24,7 @@ import {MutedWordsDialog} from '#/components/dialogs/MutedWords' import {SigninDialog} from '#/components/dialogs/Signin' import { Outlet as PolicyUpdateOverlayPortalOutlet, - usePolicyUpdateStateContext, + usePolicyUpdateContext, } from '#/components/PolicyUpdateOverlay' import {Outlet as PortalOutlet} from '#/components/Portal' import {FlatNavigator, RoutesContainer} from '#/Navigation' @@ -41,7 +41,7 @@ function ShellInner() { const {_} = useLingui() const showDrawer = !isDesktop && isDrawerOpen const [showDrawerDelayedExit, setShowDrawerDelayedExit] = useState(showDrawer) - const policyUpdateState = usePolicyUpdateStateContext() + const {state: policyUpdateState} = usePolicyUpdateContext() useLayoutEffect(() => { if (showDrawer !== showDrawerDelayedExit) { |