Hide reply prompt
This commit is contained in:
@@ -38,6 +38,7 @@ import {
|
|||||||
UsePreferencesQueryResponse,
|
UsePreferencesQueryResponse,
|
||||||
usePreferencesQuery,
|
usePreferencesQuery,
|
||||||
} from '#/state/queries/preferences'
|
} from '#/state/queries/preferences'
|
||||||
|
import {useSession} from '#/state/session'
|
||||||
|
|
||||||
// const MAINTAIN_VISIBLE_CONTENT_POSITION = {minIndexForVisible: 2} TODO
|
// const MAINTAIN_VISIBLE_CONTENT_POSITION = {minIndexForVisible: 2} TODO
|
||||||
|
|
||||||
@@ -130,6 +131,7 @@ function PostThreadLoaded({
|
|||||||
onRefresh: () => void
|
onRefresh: () => void
|
||||||
onPressReply: () => void
|
onPressReply: () => void
|
||||||
}) {
|
}) {
|
||||||
|
const {hasSession} = useSession()
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const pal = usePalette('default')
|
const pal = usePalette('default')
|
||||||
const {isTablet, isDesktop} = useWebMediaQueries()
|
const {isTablet, isDesktop} = useWebMediaQueries()
|
||||||
@@ -223,7 +225,7 @@ function PostThreadLoaded({
|
|||||||
<ActivityIndicator />
|
<ActivityIndicator />
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
} else if (item === REPLY_PROMPT) {
|
} else if (item === REPLY_PROMPT && hasSession) {
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
{isDesktop && <ComposePrompt onPressCompose={onPressReply} />}
|
{isDesktop && <ComposePrompt onPressCompose={onPressReply} />}
|
||||||
@@ -305,6 +307,7 @@ function PostThreadLoaded({
|
|||||||
return null
|
return null
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
|
hasSession,
|
||||||
isTablet,
|
isTablet,
|
||||||
isDesktop,
|
isDesktop,
|
||||||
onPressReply,
|
onPressReply,
|
||||||
|
|||||||
Reference in New Issue
Block a user