Merge branch 'main' into 676-feature-customisation-not-display-mucus-cervix

This commit is contained in:
bl00dymarie
2024-02-20 12:29:28 +01:00
38 changed files with 1332 additions and 1145 deletions
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { Alert } from 'react-native'
import { Alert, Platform } from 'react-native'
import DocumentPicker from 'react-native-document-picker'
import rnfs from 'react-native-fs'
import importCsv from '../../../lib/import-export/import-from-csv'
@@ -59,21 +59,28 @@ export default function ImportData({ resetIsDeletingData, setIsLoading }) {
function openImportDialog() {
resetIsDeletingData()
Alert.alert(t('dialog.title'), t('dialog.message'), [
let buttons = [
{
text: t('dialog.cancel'),
style: 'cancel',
onPress: () => {},
},
{
text: t('dialog.delete'),
onPress: () => startImport(true),
},
{
text: t('dialog.replace'),
onPress: () => startImport(false),
},
])
{
text: t('dialog.delete'),
onPress: () => startImport(true),
},
]
if (Platform.OS === 'android') {
buttons = [buttons[0], buttons[2], buttons[1]]
}
Alert.alert(t('dialog.title'), t('dialog.message'), buttons)
}
function showImportErrorAlert(message) {