diff options
author | Eric Bailey <git@esb.lol> | 2023-11-22 16:53:11 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-22 16:53:11 -0600 |
commit | 95f8bd8ddb356ce982b31eabb2dcf9f08ba40b9b (patch) | |
tree | c25793eac2ee221ce6b431201c0d4362384c7297 /src/view/com/post-thread/PostThread.tsx | |
parent | 08333002cc4589c225c8fb82112d7059c334bfeb (diff) | |
download | voidsky-95f8bd8ddb356ce982b31eabb2dcf9f08ba40b9b.tar.zst |
[PWI] Misc (#1977)
* PostDropdownBtn * Hide reply prompt * Hide FABs
Diffstat (limited to 'src/view/com/post-thread/PostThread.tsx')
-rw-r--r-- | src/view/com/post-thread/PostThread.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx index 55448fcc9..c19833948 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({ <ActivityIndicator /> </View> ) - } else if (item === REPLY_PROMPT) { + } else if (item === REPLY_PROMPT && hasSession) { return ( <View> {isDesktop && <ComposePrompt onPressCompose={onPressReply} />} @@ -305,6 +307,7 @@ function PostThreadLoaded({ return null }, [ + hasSession, isTablet, isDesktop, onPressReply, |