Move temp off turns fertility off logic out of local storage

This commit is contained in:
bl00dymarie
2024-02-23 16:38:11 +01:00
parent 27bb25e6da
commit 5855ea0a34
2 changed files with 4 additions and 6 deletions
-6
View File
@@ -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) {