Remove shadowed follow gate handling (#7774)
This commit is contained in:
@@ -26,7 +26,6 @@ import {makeProfileLink} from '#/lib/routes/links'
|
|||||||
import {shareUrl} from '#/lib/sharing'
|
import {shareUrl} from '#/lib/sharing'
|
||||||
import {useGate} from '#/lib/statsig/statsig'
|
import {useGate} from '#/lib/statsig/statsig'
|
||||||
import {toShareUrl} from '#/lib/strings/url-helpers'
|
import {toShareUrl} from '#/lib/strings/url-helpers'
|
||||||
import {useProfileShadow} from '#/state/cache/profile-shadow'
|
|
||||||
import {Shadow} from '#/state/cache/types'
|
import {Shadow} from '#/state/cache/types'
|
||||||
import {useFeedFeedbackContext} from '#/state/feed-feedback'
|
import {useFeedFeedbackContext} from '#/state/feed-feedback'
|
||||||
import {
|
import {
|
||||||
@@ -94,15 +93,7 @@ let PostCtrls = ({
|
|||||||
post.author.viewer?.blockedBy ||
|
post.author.viewer?.blockedBy ||
|
||||||
post.author.viewer?.blockingByList,
|
post.author.viewer?.blockingByList,
|
||||||
)
|
)
|
||||||
|
const replyDisabled = post.viewer?.replyDisabled
|
||||||
const shadowedAuthor = useProfileShadow(post.author)
|
|
||||||
const followersCanReply = !!threadgateRecord?.allow?.find(
|
|
||||||
rule => rule.$type === 'app.bsky.feed.threadgate#followerRule',
|
|
||||||
)
|
|
||||||
const canOverrideReplyDisabled =
|
|
||||||
followersCanReply &&
|
|
||||||
shadowedAuthor.viewer?.following?.startsWith('at://did')
|
|
||||||
const replyDisabled = post.viewer?.replyDisabled && !canOverrideReplyDisabled
|
|
||||||
|
|
||||||
const shouldShowLoggedOutWarning = React.useMemo(() => {
|
const shouldShowLoggedOutWarning = React.useMemo(() => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user