mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Improve status mini card
This commit is contained in:
@ -21,13 +21,7 @@ export interface Props {
|
||||
}
|
||||
|
||||
const ParseEmojis = React.memo(
|
||||
({
|
||||
content,
|
||||
emojis,
|
||||
size = 'M',
|
||||
adaptiveSize = false,
|
||||
fontBold = false
|
||||
}: Props) => {
|
||||
({ content, emojis, size = 'M', adaptiveSize = false, fontBold = false }: Props) => {
|
||||
const { reduceMotionEnabled } = useAccessibility()
|
||||
|
||||
const adaptiveFontsize = useSelector(getSettingsFontsize)
|
||||
@ -51,22 +45,13 @@ const ParseEmojis = React.memo(
|
||||
image: {
|
||||
width: adaptedFontsize,
|
||||
height: adaptedFontsize,
|
||||
...(Platform.OS === 'ios'
|
||||
? {
|
||||
transform: [{ translateY: -2 }]
|
||||
}
|
||||
: {
|
||||
transform: [{ translateY: 1 }]
|
||||
})
|
||||
...(Platform.OS === 'android' && { transform: [{ translateY: 2 }] })
|
||||
}
|
||||
})
|
||||
}, [theme, adaptiveFontsize])
|
||||
|
||||
return (
|
||||
<CustomText
|
||||
style={styles.text}
|
||||
fontWeight={fontBold ? 'Bold' : undefined}
|
||||
>
|
||||
<CustomText style={styles.text} fontWeight={fontBold ? 'Bold' : undefined}>
|
||||
{emojis ? (
|
||||
content
|
||||
.split(regexEmoji)
|
||||
@ -78,11 +63,7 @@ const ParseEmojis = React.memo(
|
||||
return emojiShortcode === `:${emoji.shortcode}:`
|
||||
})
|
||||
if (emojiIndex === -1) {
|
||||
return (
|
||||
<CustomText key={emojiShortcode + i}>
|
||||
{emojiShortcode}
|
||||
</CustomText>
|
||||
)
|
||||
return <CustomText key={emojiShortcode + i}>{emojiShortcode}</CustomText>
|
||||
} else {
|
||||
const uri = reduceMotionEnabled
|
||||
? emojis[emojiIndex].static_url
|
||||
|
Reference in New Issue
Block a user