about summary refs log tree commit diff
path: root/src/view/screens/PostThread.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/screens/PostThread.tsx')
-rw-r--r--src/view/screens/PostThread.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/view/screens/PostThread.tsx b/src/view/screens/PostThread.tsx
index 8bb279be8..0bdd06269 100644
--- a/src/view/screens/PostThread.tsx
+++ b/src/view/screens/PostThread.tsx
@@ -15,6 +15,7 @@ import {useSafeAreaInsets} from 'react-native-safe-area-context'
 import {clamp} from 'lodash'
 import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
 import {logger} from '#/logger'
+import {useMinimalShellMode, useSetMinimalShellMode} from '#/state/shell'
 
 const SHELL_FOOTER_HEIGHT = 44
 
@@ -22,6 +23,8 @@ type Props = NativeStackScreenProps<CommonNavigatorParams, 'PostThread'>
 export const PostThreadScreen = withAuthRequired(
   observer(function PostThreadScreenImpl({route}: Props) {
     const store = useStores()
+    const minimalShellMode = useMinimalShellMode()
+    const setMinimalShellMode = useSetMinimalShellMode()
     const safeAreaInsets = useSafeAreaInsets()
     const {name, rkey} = route.params
     const uri = makeRecordUri(name, 'app.bsky.feed.post', rkey)
@@ -33,7 +36,7 @@ export const PostThreadScreen = withAuthRequired(
 
     useFocusEffect(
       React.useCallback(() => {
-        store.shell.setMinimalShellMode(false)
+        setMinimalShellMode(false)
         const threadCleanup = view.registerListeners()
 
         InteractionManager.runAfterInteractions(() => {
@@ -47,7 +50,7 @@ export const PostThreadScreen = withAuthRequired(
         return () => {
           threadCleanup()
         }
-      }, [store, view]),
+      }, [view, setMinimalShellMode]),
     )
 
     const onPressReply = React.useCallback(() => {
@@ -80,7 +83,7 @@ export const PostThreadScreen = withAuthRequired(
             treeView={!!store.preferences.thread.lab_treeViewEnabled}
           />
         </View>
-        {isMobile && !store.shell.minimalShellMode && (
+        {isMobile && !minimalShellMode && (
           <View
             style={[
               styles.prompt,