1
0
mirror of https://github.com/tooot-app/app synced 2025-02-11 01:10:47 +01:00

Fix crash

This commit is contained in:
Zhiyuan Zheng 2021-04-11 11:25:40 +02:00
parent 81ffaabcdc
commit 4df121e01a
No known key found for this signature in database
GPG Key ID: 078A93AB607D85E0
3 changed files with 23 additions and 24 deletions

View File

@ -72,9 +72,6 @@ const ParseEmojis = React.memo(
})
if (emojiIndex === -1) {
return <Text key={emojiShortcode + i}>{emojiShortcode}</Text>
} else {
if (i === 0) {
return <Text key={emojiShortcode + i}> </Text>
} else {
const uri = reduceMotionEnabled
? emojis[emojiIndex].static_url
@ -91,7 +88,6 @@ const ParseEmojis = React.memo(
return null
}
}
}
} else {
return <Text key={i}>{str}</Text>
}

View File

@ -152,6 +152,7 @@ const TimelinePoll: React.FC<Props> = ({
</Text>
)
} else {
if (poll.expires_at) {
return (
<Text style={[styles.expiration, { color: theme.secondary }]}>
<Trans
@ -161,6 +162,7 @@ const TimelinePoll: React.FC<Props> = ({
</Text>
)
}
}
}, [mode, i18n.language, poll.expired, poll.expires_at])
const isSelected = useCallback(

View File

@ -28,6 +28,7 @@ const ComposeDrafts: React.FC<Props> = ({ accessibleRefDrafts }) => {
if (!composeState.dirty && instanceDrafts?.length) {
return (
<View
accessible
ref={accessibleRefDrafts}
style={styles.base}
children={