ComposeReplyTo

This commit is contained in:
Eric Bailey
2024-03-19 12:01:42 -05:00
parent ecb08afa05
commit 1ec2c95e53
6 changed files with 7 additions and 25 deletions
+2 -5
View File
@@ -3,6 +3,7 @@ import {
AppBskyEmbedRecord, AppBskyEmbedRecord,
AppBskyRichtextFacet, AppBskyRichtextFacet,
ModerationDecision, ModerationDecision,
AppBskyActorDefs,
} from '@atproto/api' } from '@atproto/api'
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
@@ -10,11 +11,7 @@ export interface ComposerOptsPostRef {
uri: string uri: string
cid: string cid: string
text: string text: string
author: { author: AppBskyActorDefs.ProfileViewBasic
handle: string
displayName?: string
avatar?: string
}
embed?: AppBskyEmbedRecord.ViewRecord['embed'] embed?: AppBskyEmbedRecord.ViewRecord['embed']
moderation?: ModerationDecision moderation?: ModerationDecision
} }
@@ -87,6 +87,7 @@ export function ComposerReplyTo({replyTo}: {replyTo: ComposerOptsPostRef}) {
avatar={replyTo.author.avatar} avatar={replyTo.author.avatar}
size={50} size={50}
moderation={replyTo.moderation?.ui('avatar')} moderation={replyTo.moderation?.ui('avatar')}
type={replyTo.author.associated?.labeler ? 'labeler' : 'user'}
/> />
<View style={styles.replyToPost}> <View style={styles.replyToPost}>
<Text type="xl-medium" style={[pal.text]}> <Text type="xl-medium" style={[pal.text]}>
+1 -5
View File
@@ -205,11 +205,7 @@ let PostThreadItemLoaded = ({
uri: post.uri, uri: post.uri,
cid: post.cid, cid: post.cid,
text: record.text, text: record.text,
author: { author: post.author,
handle: post.author.handle,
displayName: post.author.displayName,
avatar: post.author.avatar,
},
embed: post.embed, embed: post.embed,
moderation, moderation,
}, },
+1 -5
View File
@@ -118,11 +118,7 @@ function PostInner({
uri: post.uri, uri: post.uri,
cid: post.cid, cid: post.cid,
text: record.text, text: record.text,
author: { author: post.author,
handle: post.author.handle,
displayName: post.author.displayName,
avatar: post.author.avatar,
},
embed: post.embed, embed: post.embed,
moderation, moderation,
}, },
+1 -5
View File
@@ -126,11 +126,7 @@ let FeedItemInner = ({
uri: post.uri, uri: post.uri,
cid: post.cid, cid: post.cid,
text: record.text || '', text: record.text || '',
author: { author: post.author,
handle: post.author.handle,
displayName: post.author.displayName,
avatar: post.author.avatar,
},
embed: post.embed, embed: post.embed,
moderation, moderation,
}, },
+1 -5
View File
@@ -59,11 +59,7 @@ export function PostThreadScreen({route}: Props) {
uri: thread.post.uri, uri: thread.post.uri,
cid: thread.post.cid, cid: thread.post.cid,
text: thread.record.text, text: thread.record.text,
author: { author: thread.post.author,
handle: thread.post.author.handle,
displayName: thread.post.author.displayName,
avatar: thread.post.author.avatar,
},
embed: thread.post.embed, embed: thread.post.embed,
}, },
onPost: () => onPost: () =>