From 3592f6f50b98c6bc81ebbf50f11f85df23376e53 Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Mon, 11 Dec 2023 15:11:36 -0800
Subject: Hide the mobile reply control if outside the threadgate (#2177)

---
 src/view/screens/PostThread.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/view/screens/PostThread.tsx')

diff --git a/src/view/screens/PostThread.tsx b/src/view/screens/PostThread.tsx
index 4b1f51748..8e9e399f5 100644
--- a/src/view/screens/PostThread.tsx
+++ b/src/view/screens/PostThread.tsx
@@ -37,6 +37,7 @@ export function PostThreadScreen({route}: Props) {
   const {isMobile} = useWebMediaQueries()
   const uri = makeRecordUri(name, 'app.bsky.feed.post', rkey)
   const {data: resolvedUri, error: uriError} = useResolveUriQuery(uri)
+  const [canReply, setCanReply] = React.useState(false)
 
   useFocusEffect(
     React.useCallback(() => {
@@ -84,10 +85,11 @@ export function PostThreadScreen({route}: Props) {
           <PostThreadComponent
             uri={resolvedUri?.uri}
             onPressReply={onPressReply}
+            onCanReply={setCanReply}
           />
         )}
       </View>
-      {isMobile && (
+      {isMobile && canReply && (
         <Animated.View
           style={[
             styles.prompt,
-- 
cgit 1.4.1

