mirror of https://github.com/tooot-app/app
Fix crashes
This commit is contained in:
parent
5551cd0e12
commit
57efc4c868
|
@ -15,8 +15,8 @@ const TimelineFullConversation = () => {
|
||||||
return queryKey &&
|
return queryKey &&
|
||||||
queryKey[1].page !== 'Toot' &&
|
queryKey[1].page !== 'Toot' &&
|
||||||
status.in_reply_to_account_id &&
|
status.in_reply_to_account_id &&
|
||||||
(status.mentions.length === 0 ||
|
(status.mentions?.length === 0 ||
|
||||||
status.mentions.filter(mention => mention.id !== status.in_reply_to_account_id).length) ? (
|
status.mentions?.filter(mention => mention.id !== status.in_reply_to_account_id).length) ? (
|
||||||
<CustomText
|
<CustomText
|
||||||
fontStyle='S'
|
fontStyle='S'
|
||||||
style={{
|
style={{
|
||||||
|
|
|
@ -22,7 +22,7 @@ const HeaderSharedReplies: React.FC = () => {
|
||||||
excludeMentions &&
|
excludeMentions &&
|
||||||
(excludeMentions.current =
|
(excludeMentions.current =
|
||||||
mentionsBeginning?.length && status?.mentions
|
mentionsBeginning?.length && status?.mentions
|
||||||
? status.mentions.filter(mention => mentionsBeginning.includes(`@${mention.username}`))
|
? status.mentions?.filter(mention => mentionsBeginning.includes(`@${mention.username}`))
|
||||||
: [])
|
: [])
|
||||||
|
|
||||||
return excludeMentions?.current.length ? (
|
return excludeMentions?.current.length ? (
|
||||||
|
|
|
@ -197,7 +197,7 @@ const menuStatus = ({
|
||||||
hidden:
|
hidden:
|
||||||
!ownAccount &&
|
!ownAccount &&
|
||||||
queryKey[1].page !== 'Notifications' &&
|
queryKey[1].page !== 'Notifications' &&
|
||||||
!status.mentions.find(
|
!status.mentions?.find(
|
||||||
mention => mention.acct === accountAcct && mention.username === accountAcct
|
mention => mention.acct === accountAcct && mention.username === accountAcct
|
||||||
) &&
|
) &&
|
||||||
!status.muted
|
!status.muted
|
||||||
|
|
|
@ -96,10 +96,10 @@ const Collections: React.FC = () => {
|
||||||
iconBack='chevron-right'
|
iconBack='chevron-right'
|
||||||
title={t('screenTabs:me.stacks.push.name')}
|
title={t('screenTabs:me.stacks.push.name')}
|
||||||
content={
|
content={
|
||||||
typeof instancePush.global === 'boolean'
|
typeof instancePush?.global === 'boolean'
|
||||||
? t('screenTabs:me.root.push.content', {
|
? t('screenTabs:me.root.push.content', {
|
||||||
defaultValue: 'false',
|
defaultValue: 'false',
|
||||||
context: instancePush.global.toString()
|
context: instancePush?.global.toString()
|
||||||
})
|
})
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,5 +19,5 @@ export const appendRemote = {
|
||||||
_remote: true
|
_remote: true
|
||||||
}),
|
}),
|
||||||
mentions: (mentions: Mastodon.Mention[]) =>
|
mentions: (mentions: Mastodon.Mention[]) =>
|
||||||
mentions.map(mention => ({ ...mention, _remote: true }))
|
mentions?.map(mention => ({ ...mention, _remote: true }))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue