1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Try to fix crashes for Text

This commit is contained in:
Zhiyuan Zheng
2021-06-11 23:07:41 +02:00
parent c72f26c260
commit 0be23da843
10 changed files with 46 additions and 46 deletions

View File

@ -130,7 +130,7 @@ const ComposeAttachments: React.FC<Props> = ({ accessibleRefAttachments }) => {
uri: item.local?.local_thumbnail || item.remote?.preview_url
}}
/>
{item.remote?.meta?.original?.duration && (
{item.remote?.meta?.original?.duration ? (
<Text
style={[
styles.duration,
@ -142,7 +142,7 @@ const ComposeAttachments: React.FC<Props> = ({ accessibleRefAttachments }) => {
>
{item.remote.meta.original.duration}
</Text>
)}
) : null}
{item.uploading ? (
<View
style={[

View File

@ -18,11 +18,11 @@ const ComposeRootHeader: React.FC = () => {
return (
<>
{instanceActive !== -1 && localInstances.length > 1 && (
{instanceActive !== -1 && localInstances.length > 1 ? (
<View style={styles.postingAs}>
<ComposePostingAs />
</View>
)}
) : null}
{composeState.spoiler.active ? <ComposeSpoilerInput /> : null}
<ComposeTextInput />
</>