From bf0f80e798b38ee748c0a98ba844d83eac7057b9 Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Wed, 21 Jun 2023 19:40:24 -0400 Subject: [PATCH] fix: Add post body preview to desktop post listing view --- src/shared/components/post/post-listing.tsx | 76 +++++++++------------ 1 file changed, 34 insertions(+), 42 deletions(-) diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 46a31ba..3c27165 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -360,28 +360,25 @@ export class PostListing extends Component { createdLine() { const post_view = this.postView; return ( - + )}{" "} + •{" "} + + ); } @@ -737,10 +730,8 @@ export class PostListing extends Component { to={`/post/${post_view.post.id}?scrollToComments=true`} data-tippy-content={title} > - - - {post_view.counts.comments} - + + {post_view.counts.comments} {this.unreadCount && ( ({this.unreadCount} {i18n.t("new")}) @@ -1068,7 +1059,7 @@ export class PostListing extends Component { const post_view = this.postView; return ( this.state.showAdvanced && ( - <> +
{this.canMod_ && ( <> {!this.creatorIsMod_ && @@ -1221,7 +1212,7 @@ export class PostListing extends Component { )} )} - +
) ); } @@ -1408,11 +1399,11 @@ export class PostListing extends Component { ); } - showMobilePreview() { + showBodyPreview() { const { body, id } = this.postView.post; return !this.showBody && body ? ( - +
{body}
) : ( @@ -1433,7 +1424,7 @@ export class PostListing extends Component { {this.mobileThumbnail()} {/* Show a preview of the post body */} - {this.showMobilePreview()} + {this.showBodyPreview()} {this.commentsLine(true)} {this.userActionsLine()} @@ -1455,6 +1446,7 @@ export class PostListing extends Component {
{this.postTitleLine()} {this.createdLine()} + {this.showBodyPreview()} {this.commentsLine()} {this.duplicatesLine()} {this.userActionsLine()} -- 2.44.1