small changes on Secondary Symptom disable function
This commit is contained in:
@@ -178,10 +178,18 @@ const Settings = () => {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const secSymptomDisabledPrompt = () => {
|
const secSymptomDisabledPrompt = () => {
|
||||||
if (isSecondarySymptomDisabled) {
|
if (!isMucusTrackingCategoryEnabled && !isCervixTrackingCategoryEnabled) {
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
labels.periodReminder.alertNoPeriodReminder.title,
|
labels.useCervix.disabled.title,
|
||||||
labels.periodReminder.alertNoPeriodReminder.message
|
labels.useCervix.disabled.message
|
||||||
|
)
|
||||||
|
} else if (
|
||||||
|
!isMucusTrackingCategoryEnabled ||
|
||||||
|
!isCervixTrackingCategoryEnabled
|
||||||
|
) {
|
||||||
|
Alert.alert(
|
||||||
|
labels.useCervix.disabled.title,
|
||||||
|
labels.useCervix.disabled.noSecondaryEnabled
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,18 +216,20 @@ const Settings = () => {
|
|||||||
onToggle={(enabled) => {
|
onToggle={(enabled) => {
|
||||||
mucusTrackingCategoryToggle(enabled)
|
mucusTrackingCategoryToggle(enabled)
|
||||||
}}
|
}}
|
||||||
text={'mucus'}
|
text={SYMPTOMS[2]}
|
||||||
value={isMucusTrackingCategoryEnabled}
|
value={isMucusTrackingCategoryEnabled}
|
||||||
trackColor={{ true: Colors.turquoiseDark }}
|
trackColor={{ true: Colors.turquoiseDark }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<AppSwitch
|
<AppSwitch
|
||||||
onToggle={(enabled) => {
|
onToggle={(enabled) => {
|
||||||
cervixTrackingCategoryToggle(enabled)
|
cervixTrackingCategoryToggle(enabled)
|
||||||
}}
|
}}
|
||||||
text={'cervix'}
|
text={SYMPTOMS[3]}
|
||||||
value={isCervixTrackingCategoryEnabled}
|
value={isCervixTrackingCategoryEnabled}
|
||||||
trackColor={{ true: Colors.turquoiseDark }}
|
trackColor={{ true: Colors.turquoiseDark }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<AppSwitch
|
<AppSwitch
|
||||||
onToggle={sexTrackingCategoryToggle}
|
onToggle={sexTrackingCategoryToggle}
|
||||||
text={SYMPTOMS[4]}
|
text={SYMPTOMS[4]}
|
||||||
|
|||||||
@@ -72,6 +72,13 @@ export default {
|
|||||||
'Cervix values are being used for symptothermal fertility detection. You can switch here to use cervical mucus values for symptothermal fertility detection',
|
'Cervix values are being used for symptothermal fertility detection. You can switch here to use cervical mucus values for symptothermal fertility detection',
|
||||||
cervixModeOff:
|
cervixModeOff:
|
||||||
'By default, cervical mucus values are being used for symptothermal fertility detection. You can switch here to use cervix values for symptothermal fertility detection',
|
'By default, cervical mucus values are being used for symptothermal fertility detection. You can switch here to use cervix values for symptothermal fertility detection',
|
||||||
|
disabled: {
|
||||||
|
title: 'Disabled',
|
||||||
|
message:
|
||||||
|
'To set the secondary symptom please first enable the temperature, cervical mucus or cervix tracking category as well as the fertility feature in the customization settings.',
|
||||||
|
noSecondaryEnabled:
|
||||||
|
'To switch the secondary symptom both cervical mucus an cervix need to be enabled in the customization settings.',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
periodPrediction: {
|
periodPrediction: {
|
||||||
title: 'Period predictions',
|
title: 'Period predictions',
|
||||||
|
|||||||
Reference in New Issue
Block a user