From 195e258a51b7ef6e61fcad3244e4060136dd56f1 Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Sun, 2 Jul 2023 11:23:42 -0400 Subject: [PATCH 1/2] fix: Post expand button was not showing if body-only post --- src/shared/components/post/post-listing.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 5c562a4a..309d6cd7 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -501,8 +501,7 @@ export class PostListing extends Component { * body by the parent component, show the MetadataCard/body toggle. */} {!this.props.showBody && - post.url && - post.embed_title && + ((post.url && post.embed_title) || post.body) && this.showPreviewButton()} {post.removed && ( From 868601fa580e798e75ac82671ad56376943c4368 Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Sun, 2 Jul 2023 11:26:44 -0400 Subject: [PATCH 2/2] fix: Update comment to reflect new logic --- src/shared/components/post/post-listing.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 309d6cd7..efa4ed21 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -497,8 +497,9 @@ export class PostListing extends Component { {/** - * If there is a URL, an embed title, and we were not told to show the - * body by the parent component, show the MetadataCard/body toggle. + * If there is (a) a URL and an embed title, or (b) a post body, and + * we were not told to show the body by the parent component, show the + * MetadataCard/body toggle. */} {!this.props.showBody && ((post.url && post.embed_title) || post.body) &&