diff --git a/components/settings/customization/index.js b/components/settings/customization/index.js index 1782104..a941e64 100644 --- a/components/settings/customization/index.js +++ b/components/settings/customization/index.js @@ -88,6 +88,10 @@ const Settings = () => { const temperatureTrackingCategoryToggle = (value) => { setTemperatureTrackingCategory(value) saveTemperatureTrackingCategory(value) + if (!value) { + setFertilityTrackingEnabled(false) + saveFertilityTrackingEnabled(false) + } } const mucusTrackingCategoryToggle = (value) => { manageSecondarySymptom(cervixTrackingCategoryObservable.value, value) diff --git a/local-storage.js b/local-storage.js index 2081547..b7ad678 100644 --- a/local-storage.js +++ b/local-storage.js @@ -107,12 +107,6 @@ export async function saveTemperatureTrackingCategory(bool) { temperatureTrackingCategoryObservable.set(bool) if (!temperatureTrackingCategoryObservable.value) { - // if temperature tracking is turned off, the fertility tracking gets disabled - const fertilityTrackingResult = await AsyncStorage.getItem('fertilityTracking') - if (fertilityTrackingResult) { - saveFertilityTrackingEnabled(false) - } - // if temperature tracking is turned off, the temperature reminder gets disabled const tempReminderResult = await AsyncStorage.getItem('tempReminder') if (tempReminderResult && JSON.parse(tempReminderResult).enabled) {