From 3ae5f2886b5832e1653f5a6a9529c0ac2fc47208 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Mon, 19 Dec 2022 18:51:13 -0600 Subject: [PATCH] Enable image-only posts --- src/view/com/composer/ComposePost.tsx | 2 +- src/view/com/post-thread/PostThreadItem.tsx | 39 +++++++++++++-------- src/view/com/post/Post.tsx | 18 ++++++---- src/view/com/posts/FeedItem.tsx | 18 ++++++---- 4 files changed, 47 insertions(+), 30 deletions(-) diff --git a/src/view/com/composer/ComposePost.tsx b/src/view/com/composer/ComposePost.tsx index 65120b66..6248e136 100644 --- a/src/view/com/composer/ComposePost.tsx +++ b/src/view/com/composer/ComposePost.tsx @@ -117,7 +117,7 @@ export const ComposePost = observer(function ComposePost({ return } setError('') - if (text.trim().length === 0) { + if (text.trim().length === 0 && selectedPhotos.length === 0) { setError('Did you want to say anything?') return false } diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 45fd8611..ec44a380 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -159,14 +159,19 @@ export const PostThreadItem = observer(function PostThreadItem({ - - - + {record.text ? ( + + + + ) : undefined} {item._isHighlightedPost && hasEngagement ? ( @@ -271,13 +276,17 @@ export const PostThreadItem = observer(function PostThreadItem({ onCopyPostText={onCopyPostText} onDeletePost={onDeletePost} /> - - - + {record.text ? ( + + + + ) : ( + + )} )} - - - + {record.text ? ( + + + + ) : ( + + )} )} - - - + {record.text ? ( + + + + ) : ( + + )}