From 9bab9c3cab264997b0744cfe8e6e3e9ea5331d9e Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 26 Mar 2023 22:10:35 -0400 Subject: [PATCH] Don't show icons / banners for banned users and removed communities. (#962) - Fixes #961 --- src/shared/components/community/community-link.tsx | 7 ++++--- src/shared/components/community/sidebar.tsx | 2 +- src/shared/components/person/person-listing.tsx | 7 ++++--- src/shared/components/person/profile.tsx | 7 ++++++- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/shared/components/community/community-link.tsx b/src/shared/components/community/community-link.tsx index b65e3d1..04e7a51 100644 --- a/src/shared/components/community/community-link.tsx +++ b/src/shared/components/community/community-link.tsx @@ -58,9 +58,10 @@ export class CommunityLink extends Component { let icon = this.props.community.icon; return ( <> - {!this.props.hideAvatar && showAvatars() && icon && ( - - )} + {!this.props.hideAvatar && + !this.props.community.removed && + showAvatars() && + icon && } {displayName} ); diff --git a/src/shared/components/community/sidebar.tsx b/src/shared/components/community/sidebar.tsx index 144075b..688a8e8 100644 --- a/src/shared/components/community/sidebar.tsx +++ b/src/shared/components/community/sidebar.tsx @@ -119,7 +119,7 @@ export class Sidebar extends Component { return (
- {this.props.showIcon && ( + {this.props.showIcon && !community.removed && ( )} {community.title} diff --git a/src/shared/components/person/person-listing.tsx b/src/shared/components/person/person-listing.tsx index 3050450..6cf4ad1 100644 --- a/src/shared/components/person/person-listing.tsx +++ b/src/shared/components/person/person-listing.tsx @@ -73,9 +73,10 @@ export class PersonListing extends Component { let avatar = this.props.person.avatar; return ( <> - {avatar && !this.props.hideAvatar && showAvatars() && ( - - )} + {avatar && + !this.props.hideAvatar && + !this.props.person.banned && + showAvatars() && } {displayName} ); diff --git a/src/shared/components/person/profile.tsx b/src/shared/components/person/profile.tsx index d12a981..0195cb8 100644 --- a/src/shared/components/person/profile.tsx +++ b/src/shared/components/person/profile.tsx @@ -384,7 +384,12 @@ export class Profile extends Component { return ( pv && (
- + {!isBanned(pv.person) && ( + + )}
-- 2.44.1