1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
xmflsct
2022-12-21 01:07:12 +01:00
parent e95f1e8157
commit 047464a9c1
5 changed files with 10 additions and 6 deletions

View File

@ -196,7 +196,7 @@ const ComposeDraftsList: React.FC<ScreenComposeStackScreenProps<'Screen-Compose-
rightOpenValue={-actionWidth}
previewOpenValue={-actionWidth / 2}
ItemSeparatorComponent={ComponentSeparator}
keyExtractor={item => item.timestamp.toString()}
keyExtractor={item => item.timestamp?.toString()}
/>
</PanGestureHandler>
<Modal

View File

@ -43,11 +43,11 @@ const composePost = async (
e => e && e.length && formData.append('poll[options][]', e)
)
formData.append('poll[expires_in]', composeState.poll.expire)
formData.append('poll[multiple]', composeState.poll.multiple.toString())
formData.append('poll[multiple]', composeState.poll.multiple?.toString())
}
if (composeState.attachments.uploads.filter(upload => upload.remote && upload.remote.id).length) {
formData.append('sensitive', composeState.attachments.sensitive.toString())
formData.append('sensitive', composeState.attachments.sensitive?.toString())
composeState.attachments.uploads.forEach(e => formData.append('media_ids[]', e.remote!.id!))
}

View File

@ -115,7 +115,11 @@ const Collections: React.FC = () => {
iconFront={instancePush ? 'Bell' : 'BellOff'}
iconBack='ChevronRight'
title={t('me.stacks.push.name')}
content={t('me.root.push.content', { context: instancePush.global.toString() })}
content={
typeof instancePush.global === 'boolean'
? t('me.root.push.content', { context: instancePush.global.toString() })
: undefined
}
onPress={() => navigation.navigate('Tab-Me-Push')}
/>
</MenuContainer>