Revert "Fix undefined block (#4471)" (#4472)

This reverts commit 7cac413f3b.
zio/stable
Eric Bailey 2024-06-10 20:49:28 -05:00 committed by GitHub
parent 7cac413f3b
commit 848151c4f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 22 deletions

View File

@ -370,10 +370,7 @@ function Inner({
profile: profileShadow, profile: profileShadow,
logContext: 'ProfileHoverCard', logContext: 'ProfileHoverCard',
}) })
const isProfileBlocked = const blockHide = profile.viewer?.blocking || profile.viewer?.blockedBy
profile.viewer?.blocking ||
profile.viewer?.blockedBy ||
profile.viewer?.blockingByList
const following = formatCount(profile.followsCount || 0) const following = formatCount(profile.followsCount || 0)
const followers = formatCount(profile.followersCount || 0) const followers = formatCount(profile.followersCount || 0)
const pluralizedFollowers = plural(profile.followersCount || 0, { const pluralizedFollowers = plural(profile.followersCount || 0, {
@ -404,7 +401,7 @@ function Inner({
/> />
</Link> </Link>
{!isMe && !isProfileBlocked && ( {!isMe && (
<Button <Button
size="small" size="small"
color={profileShadow.viewer?.following ? 'secondary' : 'primary'} color={profileShadow.viewer?.following ? 'secondary' : 'primary'}
@ -442,7 +439,7 @@ function Inner({
</View> </View>
</Link> </Link>
{!isProfileBlocked && ( {!blockHide && (
<> <>
<View style={[a.flex_row, a.flex_wrap, a.gap_md, a.pt_xs]}> <View style={[a.flex_row, a.flex_wrap, a.gap_md, a.pt_xs]}>
<InlineLinkText <InlineLinkText

View File

@ -196,12 +196,6 @@ let FeedItemInner = ({
}, },
] ]
const isParentBlocked = Boolean(
parentAuthor?.viewer?.blockedBy ||
parentAuthor?.viewer?.blocking ||
parentAuthor?.viewer?.blockingByList,
)
return ( return (
<Link <Link
testID={`feedItem-by-${post.author.handle}`} testID={`feedItem-by-${post.author.handle}`}
@ -326,16 +320,7 @@ let FeedItemInner = ({
onOpenAuthor={onOpenAuthor} onOpenAuthor={onOpenAuthor}
/> />
{!isThreadChild && showReplyTo && parentAuthor && ( {!isThreadChild && showReplyTo && parentAuthor && (
<ReplyToLabel <ReplyToLabel profile={parentAuthor} />
profile={
isParentBlocked
? {
...parentAuthor,
displayName: _(msg`a blocked user`),
}
: parentAuthor
}
/>
)} )}
<LabelsOnMyPost post={post} /> <LabelsOnMyPost post={post} />
<PostContent <PostContent