From: Dessalines Date: Mon, 27 Mar 2023 02:10:35 +0000 (-0400) Subject: Don't show icons / banners for banned users and removed communities. (#962) X-Git-Url: http://these/git/readmes/README.ja.md?a=commitdiff_plain;h=9bab9c3cab264997b0744cfe8e6e3e9ea5331d9e;p=lemmy-ui.git Don't show icons / banners for banned users and removed communities. (#962) - Fixes #961 --- 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) && ( + + )}