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

@ -116,13 +116,13 @@ const TimelineDefault: React.FC<Props> = ({
}}
>
{typeof actualStatus.content === 'string' &&
actualStatus.content.length > 0 && (
<TimelineContent
status={actualStatus}
highlighted={highlighted}
disableDetails={disableDetails}
/>
)}
actualStatus.content.length > 0 ? (
<TimelineContent
status={actualStatus}
highlighted={highlighted}
disableDetails={disableDetails}
/>
) : null}
{queryKey && actualStatus.poll ? (
<TimelinePoll
queryKey={queryKey}
@ -138,9 +138,9 @@ const TimelineDefault: React.FC<Props> = ({
actualStatus.media_attachments.length ? (
<TimelineAttachment status={actualStatus} />
) : null}
{!disableDetails && actualStatus.card && (
{!disableDetails && actualStatus.card ? (
<TimelineCard card={actualStatus.card} />
)}
) : null}
{!disableDetails ? (
<TimelineFullConversation queryKey={queryKey} status={actualStatus} />
) : null}
@ -148,7 +148,7 @@ const TimelineDefault: React.FC<Props> = ({
<TimelineActionsUsers status={actualStatus} highlighted={highlighted} />
</View>
{queryKey && !disableDetails && (
{queryKey && !disableDetails ? (
<TimelineActions
queryKey={queryKey}
rootQueryKey={rootQueryKey}
@ -162,7 +162,7 @@ const TimelineDefault: React.FC<Props> = ({
).map(d => d?.acct)}
reblog={item.reblog ? true : false}
/>
)}
) : null}
</Pressable>
)
}