diff --git a/lib/sympto-adapter.js b/lib/sympto-adapter.js index 821e7c5..628ea2b 100644 --- a/lib/sympto-adapter.js +++ b/lib/sympto-adapter.js @@ -1,6 +1,7 @@ import getFertilityStatus from './sympto' import cycleModule from './cycle' import { fertilityStatus } from '../i18n/en/labels' +import { useCervixObservable } from '../local-storage' export function getFertilityStatusForDay(dateString) { const status = getCycleStatusForDay(dateString) @@ -48,6 +49,8 @@ export function getCycleStatusForDay(dateString, opts = {}) { } } + cycleInfo.secondarySymptom = useCervixObservable.value ? 'cervix' : 'mucus' + return getFertilityStatus(cycleInfo) } diff --git a/local-storage/index.js b/local-storage/index.js index cf3fcea..89b37d9 100644 --- a/local-storage/index.js +++ b/local-storage/index.js @@ -48,7 +48,6 @@ export const useCervixObservable = Observable() setObvWithInitValue('useCervix', useCervixObservable, false) export async function saveUseCervix(bool) { - console.log('saving cervix to', bool) await AsyncStorage.setItem('useCervix', JSON.stringify(bool)) useCervixObservable.set(bool) } @@ -63,8 +62,6 @@ export async function saveEncryptionFlag(bool) { async function setObvWithInitValue(key, obv, defaultValue) { const result = await AsyncStorage.getItem(key) - console.log('result from db for key') - console.log(result) let value if (result) { value = JSON.parse(result)