diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-12-19 18:51:13 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-12-19 18:51:13 -0600 |
commit | 3ae5f2886b5832e1653f5a6a9529c0ac2fc47208 (patch) | |
tree | c98ca88860562718821a7fb40106d32b6f4673f6 /src/view/com/post-thread/PostThreadItem.tsx | |
parent | e99eb7bfad2fd3eeb7cfcec26e554580c73c4d7d (diff) | |
download | voidsky-3ae5f2886b5832e1653f5a6a9529c0ac2fc47208.tar.zst |
Enable image-only posts
Diffstat (limited to 'src/view/com/post-thread/PostThreadItem.tsx')
-rw-r--r-- | src/view/com/post-thread/PostThreadItem.tsx | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 45fd86116..ec44a380a 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({ </View> </View> <View style={[s.pl10, s.pr10, s.pb10]}> - <View - style={[styles.postTextContainer, styles.postTextLargeContainer]}> - <RichText - text={record.text} - entities={record.entities} - style={[styles.postText, styles.postTextLarge]} - /> - </View> + {record.text ? ( + <View + style={[ + styles.postTextContainer, + styles.postTextLargeContainer, + ]}> + <RichText + text={record.text} + entities={record.entities} + style={[styles.postText, styles.postTextLarge]} + /> + </View> + ) : undefined} <PostEmbeds embed={item.embed} style={s.mb10} /> {item._isHighlightedPost && hasEngagement ? ( <View style={styles.expandedInfo}> @@ -271,13 +276,17 @@ export const PostThreadItem = observer(function PostThreadItem({ onCopyPostText={onCopyPostText} onDeletePost={onDeletePost} /> - <View style={styles.postTextContainer}> - <RichText - text={record.text} - entities={record.entities} - style={[styles.postText]} - /> - </View> + {record.text ? ( + <View style={styles.postTextContainer}> + <RichText + text={record.text} + entities={record.entities} + style={[styles.postText]} + /> + </View> + ) : ( + <View style={{height: 5}} /> + )} <PostEmbeds embed={item.embed} style={{marginBottom: 10}} /> <PostCtrls replyCount={item.replyCount} |