diff options
author | Eric Bailey <git@esb.lol> | 2024-09-23 10:40:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 00:40:37 +0900 |
commit | 5eb294488f08534abac3335acfa366cffea9259e (patch) | |
tree | 94453e05d751b5b2ef91467460c258ed5e00b80d /src/components/RichText.tsx | |
parent | 443f3a64069f081764c2f49578108a9570e8e834 (diff) | |
download | voidsky-5eb294488f08534abac3335acfa366cffea9259e.tar.zst |
[Neue] Handle emoji within custom font (#5449)
* Support emoji in text with custom font * Add emoji support to elements that need it * Remove unused file causing lint failure * Fix a few more emoji locations * Couple more * No throw
Diffstat (limited to 'src/components/RichText.tsx')
-rw-r--r-- | src/components/RichText.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/components/RichText.tsx b/src/components/RichText.tsx index 751177597..1c65a87ac 100644 --- a/src/components/RichText.tsx +++ b/src/components/RichText.tsx @@ -66,6 +66,7 @@ export function RichText({ (flattenedStyle.fontSize ?? a.text_sm.fontSize) * emojiMultiplier return ( <Text + emoji selectable={selectable} testID={testID} style={[plainStyles, {fontSize}]} @@ -77,6 +78,7 @@ export function RichText({ } return ( <Text + emoji selectable={selectable} testID={testID} style={plainStyles} @@ -148,7 +150,11 @@ export function RichText({ />, ) } else { - els.push(segment.text) + els.push( + <Text key={key} emoji style={plainStyles}> + {segment.text} + </Text>, + ) } key++ } @@ -213,6 +219,7 @@ function RichTextTag({ <React.Fragment> <TagMenu control={control} tag={tag} authorHandle={authorHandle}> <Text + emoji selectable={selectable} {...native({ accessibilityLabel: _(msg`Hashtag: #${tag}`), |