]> Untitled Git - lemmy-ui.git/commitdiff
feat(UI): Hide avatars on listings
authorJay Sitter <jay@jaysitter.com>
Sun, 25 Jun 2023 20:33:11 +0000 (16:33 -0400)
committerJay Sitter <jay@jaysitter.com>
Sun, 25 Jun 2023 20:33:11 +0000 (16:33 -0400)
src/shared/components/post/post-listing.tsx
src/shared/components/post/post-listings.tsx

index 76a3e445b6e80ce68443bd1ae06549b95ee95237..a27d8334dc9338c1a43ef52b5132dc920b170905 100644 (file)
@@ -106,6 +106,7 @@ interface PostListingProps {
   siteLanguages: number[];
   showCommunity?: boolean;
   showBody?: boolean;
+  hideAvatars?: boolean;
   hideImage?: boolean;
   enableDownvotes?: boolean;
   enableNsfw?: boolean;
@@ -397,7 +398,10 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
     const post_view = this.postView;
     return (
       <span className="small">
-        <PersonListing person={post_view.creator} />
+        <PersonListing
+          person={post_view.creator}
+          hideAvatar={this.props.hideAvatars}
+        />
         {this.creatorIsMod_ && (
           <span className="mx-1 badge text-bg-light">
             {I18NextService.i18n.t("mod")}
@@ -417,7 +421,10 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
           <>
             {" "}
             {I18NextService.i18n.t("to")}{" "}
-            <CommunityLink community={post_view.community} />
+            <CommunityLink
+              community={post_view.community}
+              hideAvatar={this.props.hideAvatars}
+            />
           </>
         )}
         {post_view.post.language_id !== 0 && (
index 1fdaeba2ca40f1aa1f45bbdae292f3c3a908d5cc..29bbf588ed9b2d3d4d696dee57be0f9345c28b1f 100644 (file)
@@ -76,6 +76,7 @@ export class PostListings extends Component<PostListingsProps, any> {
                 showCommunity={this.props.showCommunity}
                 enableDownvotes={this.props.enableDownvotes}
                 enableNsfw={this.props.enableNsfw}
+                hideAvatars={true}
                 viewOnly={this.props.viewOnly}
                 allLanguages={this.props.allLanguages}
                 siteLanguages={this.props.siteLanguages}