From 8a8b3217fa65c35e2830f75cced073f772f5b09b Mon Sep 17 00:00:00 2001 From: wunderfisch Date: Mon, 12 Feb 2024 16:05:49 +0100 Subject: [PATCH] small changes on Secondary Symptom disable function --- components/settings/customization/index.js | 20 +++++++++++++++----- i18n/en/settings.js | 7 +++++++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/components/settings/customization/index.js b/components/settings/customization/index.js index 83dfb28..b3c6086 100644 --- a/components/settings/customization/index.js +++ b/components/settings/customization/index.js @@ -178,10 +178,18 @@ const Settings = () => { }, []) const secSymptomDisabledPrompt = () => { - if (isSecondarySymptomDisabled) { + if (!isMucusTrackingCategoryEnabled && !isCervixTrackingCategoryEnabled) { Alert.alert( - labels.periodReminder.alertNoPeriodReminder.title, - labels.periodReminder.alertNoPeriodReminder.message + labels.useCervix.disabled.title, + 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) => { mucusTrackingCategoryToggle(enabled) }} - text={'mucus'} + text={SYMPTOMS[2]} value={isMucusTrackingCategoryEnabled} trackColor={{ true: Colors.turquoiseDark }} /> + { cervixTrackingCategoryToggle(enabled) }} - text={'cervix'} + text={SYMPTOMS[3]} value={isCervixTrackingCategoryEnabled} trackColor={{ true: Colors.turquoiseDark }} /> +