Fix Android crash

This commit is contained in:
xmflsct 2022-08-17 22:58:30 +02:00
parent 1620963863
commit 3853066330
1 changed files with 12 additions and 12 deletions

View File

@ -32,25 +32,25 @@ const TimelineHeaderNotification = ({ queryKey, notification }: Props) => {
const shareOnPress = const shareOnPress =
status && status?.visibility !== 'direct' status && status?.visibility !== 'direct'
? contextMenuShare({ ? contextMenuShare({
actions: contextMenuActions, actions: contextMenuActions,
type: 'status', type: 'status',
url: status.url || status.uri url: status.url || status.uri
}) })
: null : null
const statusOnPress = contextMenuStatus({ const statusOnPress = status && contextMenuStatus({
actions: contextMenuActions, actions: contextMenuActions,
status: status!, status: status,
queryKey queryKey
}) })
const accountOnPress = contextMenuAccount({ const accountOnPress = status && contextMenuAccount({
actions: contextMenuActions, actions: contextMenuActions,
type: 'status', type: 'status',
queryKey, queryKey,
id: status!.account.id id: status.account.id
}) })
const instanceOnPress = contextMenuInstance({ const instanceOnPress = status && contextMenuInstance({
actions: contextMenuActions, actions: contextMenuActions,
status: status!, status: status,
queryKey queryKey
}) })
@ -106,7 +106,7 @@ const TimelineHeaderNotification = ({ queryKey, notification }: Props) => {
style={{ style={{
flex: flex:
notification.type === 'follow' || notification.type === 'follow' ||
notification.type === 'follow_request' notification.type === 'follow_request'
? 1 ? 1
: 4 : 4
}} }}
@ -150,7 +150,7 @@ const TimelineHeaderNotification = ({ queryKey, notification }: Props) => {
style={[ style={[
{ marginLeft: StyleConstants.Spacing.M }, { marginLeft: StyleConstants.Spacing.M },
notification.type === 'follow' || notification.type === 'follow' ||
notification.type === 'follow_request' notification.type === 'follow_request'
? { flexShrink: 1 } ? { flexShrink: 1 }
: { flex: 1 } : { flex: 1 }
]} ]}