mirror of https://github.com/tooot-app/app
commit
80c6b1fe26
|
@ -73,23 +73,19 @@ const ParseEmojis = React.memo(
|
|||
if (emojiIndex === -1) {
|
||||
return <Text key={emojiShortcode + i}>{emojiShortcode}</Text>
|
||||
} else {
|
||||
if (i === 0) {
|
||||
return <Text key={emojiShortcode + i}> </Text>
|
||||
const uri = reduceMotionEnabled
|
||||
? emojis[emojiIndex].static_url
|
||||
: emojis[emojiIndex].url
|
||||
if (validUrl.isHttpsUri(uri)) {
|
||||
return (
|
||||
<FastImage
|
||||
key={emojiShortcode + i}
|
||||
source={{ uri }}
|
||||
style={styles.image}
|
||||
/>
|
||||
)
|
||||
} else {
|
||||
const uri = reduceMotionEnabled
|
||||
? emojis[emojiIndex].static_url
|
||||
: emojis[emojiIndex].url
|
||||
if (validUrl.isHttpsUri(uri)) {
|
||||
return (
|
||||
<FastImage
|
||||
key={emojiShortcode + i}
|
||||
source={{ uri }}
|
||||
style={styles.image}
|
||||
/>
|
||||
)
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -152,14 +152,16 @@ const TimelinePoll: React.FC<Props> = ({
|
|||
</Text>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<Text style={[styles.expiration, { color: theme.secondary }]}>
|
||||
<Trans
|
||||
i18nKey='componentTimeline:shared.poll.meta.expiration.until'
|
||||
components={[<RelativeTime date={poll.expires_at} />]}
|
||||
/>
|
||||
</Text>
|
||||
)
|
||||
if (poll.expires_at) {
|
||||
return (
|
||||
<Text style={[styles.expiration, { color: theme.secondary }]}>
|
||||
<Trans
|
||||
i18nKey='componentTimeline:shared.poll.meta.expiration.until'
|
||||
components={[<RelativeTime date={poll.expires_at} />]}
|
||||
/>
|
||||
</Text>
|
||||
)
|
||||
}
|
||||
}
|
||||
}, [mode, i18n.language, poll.expired, poll.expires_at])
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ const ComposeDrafts: React.FC<Props> = ({ accessibleRefDrafts }) => {
|
|||
if (!composeState.dirty && instanceDrafts?.length) {
|
||||
return (
|
||||
<View
|
||||
accessible
|
||||
ref={accessibleRefDrafts}
|
||||
style={styles.base}
|
||||
children={
|
||||
|
|
Loading…
Reference in New Issue