Remove WhoCanReply from thread children

This commit is contained in:
Eric Bailey
2024-08-12 10:46:46 -05:00
parent 372a235dd7
commit 949e271a72
+14 -11
View File
@@ -685,6 +685,7 @@ function ExpandedPostDetails({
const pal = usePalette('default') const pal = usePalette('default')
const {_} = useLingui() const {_} = useLingui()
const openLink = useOpenLink() const openLink = useOpenLink()
const isRootPost = !('reply' in post.record)
const onTranslatePress = React.useCallback(() => { const onTranslatePress = React.useCallback(() => {
openLink(translatorUrl) openLink(translatorUrl)
@@ -701,17 +702,19 @@ function ExpandedPostDetails({
s.mb10, s.mb10,
]}> ]}>
<Text style={[a.text_sm, pal.textLight]}>{niceDate(post.indexedAt)}</Text> <Text style={[a.text_sm, pal.textLight]}>{niceDate(post.indexedAt)}</Text>
<WhoCanReply {isRootPost && (
post={post} <WhoCanReply
postgate={ post={post}
// TODO maybe define at query postgate={
postgate || // TODO maybe define at query
createPostgateRecord({ postgate ||
post: post.uri, createPostgateRecord({
}) post: post.uri,
} })
isThreadAuthor={isThreadAuthor} }
/> isThreadAuthor={isThreadAuthor}
/>
)}
{needsTranslation && ( {needsTranslation && (
<> <>
<Text style={[a.text_sm, pal.textLight]}>&middot;</Text> <Text style={[a.text_sm, pal.textLight]}>&middot;</Text>