Enable image-only posts
parent
e99eb7bfad
commit
3ae5f2886b
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -175,13 +175,17 @@ export const Post = observer(function Post({
|
|||
</Link>
|
||||
</View>
|
||||
)}
|
||||
<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}
|
||||
|
|
|
@ -187,13 +187,17 @@ export const FeedItem = observer(function FeedItem({
|
|||
</Link>
|
||||
</View>
|
||||
)}
|
||||
<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={styles.postEmbeds} />
|
||||
<PostCtrls
|
||||
replyCount={item.replyCount}
|
||||
|
|
Loading…
Reference in New Issue