Hide bio and social proof for blocked users (#4504)

zio/stable
dan 2024-06-13 11:03:31 +02:00 committed by GitHub
parent 7faa1d9131
commit 498e46ae4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -75,6 +75,10 @@ let ProfileHeaderStandard = ({
const [_queueBlock, queueUnblock] = useProfileBlockMutationQueue(profile) const [_queueBlock, queueUnblock] = useProfileBlockMutationQueue(profile)
const unblockPromptControl = Prompt.usePromptControl() const unblockPromptControl = Prompt.usePromptControl()
const requireAuth = useRequireAuth() const requireAuth = useRequireAuth()
const isBlockedUser =
profile.viewer?.blocking ||
profile.viewer?.blockedBy ||
profile.viewer?.blockingByList
const onPressEditProfile = React.useCallback(() => { const onPressEditProfile = React.useCallback(() => {
track('ProfileHeader:EditProfileButtonClicked') track('ProfileHeader:EditProfileButtonClicked')
@ -257,7 +261,7 @@ let ProfileHeaderStandard = ({
<ProfileHeaderDisplayName profile={profile} moderation={moderation} /> <ProfileHeaderDisplayName profile={profile} moderation={moderation} />
<ProfileHeaderHandle profile={profile} /> <ProfileHeaderHandle profile={profile} />
</View> </View>
{!isPlaceholderProfile && ( {!isPlaceholderProfile && !isBlockedUser && (
<> <>
<ProfileHeaderMetrics profile={profile} /> <ProfileHeaderMetrics profile={profile} />
{descriptionRT && !moderation.ui('profileView').blur ? ( {descriptionRT && !moderation.ui('profileView').blur ? (
@ -274,6 +278,7 @@ let ProfileHeaderStandard = ({
) : undefined} ) : undefined}
{!isMe && {!isMe &&
!isBlockedUser &&
shouldShowKnownFollowers(profile.viewer?.knownFollowers) && ( shouldShowKnownFollowers(profile.viewer?.knownFollowers) && (
<View style={[a.flex_row, a.align_center, a.gap_sm, a.pt_md]}> <View style={[a.flex_row, a.align_center, a.gap_sm, a.pt_md]}>
<KnownFollowers <KnownFollowers