[🐴] Record message (#4230)

* send record via link in text

* re-trim text after removing link

* record message

* only show copy text if message + add translate

* reduce padding

* adjust padding

* Tweak spacing

* Stop clickthrough for hidden content

* Update bg to show labels

---------

Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
Samuel Newman 2024-05-31 18:43:04 +03:00 committed by GitHub
parent 8eb3cebb36
commit 22e1eb18c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 225 additions and 58 deletions

View file

@ -4,6 +4,7 @@ import {
StyleProp,
StyleSheet,
Text,
TextStyle,
View,
ViewStyle,
} from 'react-native'
@ -41,11 +42,13 @@ export function PostEmbeds({
moderation,
onOpen,
style,
quoteTextStyle,
}: {
embed?: Embed
moderation?: ModerationDecision
onOpen?: () => void
style?: StyleProp<ViewStyle>
quoteTextStyle?: StyleProp<TextStyle>
}) {
const pal = usePalette('default')
const {openLightbox} = useLightboxControls()
@ -60,7 +63,11 @@ export function PostEmbeds({
moderation={moderation}
onOpen={onOpen}
/>
<MaybeQuoteEmbed embed={embed.record} onOpen={onOpen} />
<MaybeQuoteEmbed
embed={embed.record}
onOpen={onOpen}
textStyle={quoteTextStyle}
/>
</View>
)
}
@ -87,7 +94,14 @@ export function PostEmbeds({
// quote post
// =
return <MaybeQuoteEmbed embed={embed} style={style} onOpen={onOpen} />
return (
<MaybeQuoteEmbed
embed={embed}
style={style}
textStyle={quoteTextStyle}
onOpen={onOpen}
/>
)
}
// image embed