From 03120c28f75042bcbddcdc0ec40b537bfe4c36d3 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 22 Nov 2023 14:39:24 -0600 Subject: [PATCH] Hide reply prompt --- src/view/com/post-thread/PostThread.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx index 55448fcc96..c19833948d 100644 --- a/src/view/com/post-thread/PostThread.tsx +++ b/src/view/com/post-thread/PostThread.tsx @@ -38,6 +38,7 @@ import { UsePreferencesQueryResponse, usePreferencesQuery, } from '#/state/queries/preferences' +import {useSession} from '#/state/session' // const MAINTAIN_VISIBLE_CONTENT_POSITION = {minIndexForVisible: 2} TODO @@ -130,6 +131,7 @@ function PostThreadLoaded({ onRefresh: () => void onPressReply: () => void }) { + const {hasSession} = useSession() const {_} = useLingui() const pal = usePalette('default') const {isTablet, isDesktop} = useWebMediaQueries() @@ -223,7 +225,7 @@ function PostThreadLoaded({ ) - } else if (item === REPLY_PROMPT) { + } else if (item === REPLY_PROMPT && hasSession) { return ( {isDesktop && } @@ -305,6 +307,7 @@ function PostThreadLoaded({ return null }, [ + hasSession, isTablet, isDesktop, onPressReply,