[APP-1031] Add new followerRule to threadgate settings (#7681)
* Add new followerRule to threadgate settings * Handle WhoCanReply copy * Handle follow case * fix ci * Revert "Handle follow case" This reverts commitbc454dad89. * Hide Follow button if followedBy rule enabled * Revert "Revert "Handle follow case"" This reverts commitcadc46d2dc. --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
@@ -241,6 +241,11 @@ let PostThreadItemLoaded = ({
|
||||
return makeProfileLink(post.author, 'post', urip.rkey, 'quotes')
|
||||
}, [post.uri, post.author])
|
||||
const quotesTitle = _(msg`Quotes of this post`)
|
||||
const onlyFollowersCanReply = !!threadgateRecord?.allow?.find(
|
||||
rule => rule.$type === 'app.bsky.feed.threadgate#followerRule',
|
||||
)
|
||||
const showFollowButton =
|
||||
currentAccount?.did !== post.author.did && !onlyFollowersCanReply
|
||||
|
||||
const translatorUrl = getTranslatorLink(
|
||||
record?.text || '',
|
||||
@@ -343,7 +348,7 @@ let PostThreadItemLoaded = ({
|
||||
</Text>
|
||||
</Link>
|
||||
</View>
|
||||
{currentAccount?.did !== post.author.did && (
|
||||
{showFollowButton && (
|
||||
<View>
|
||||
<PostThreadFollowBtn did={post.author.did} />
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user