Chore: Remove one time transform for secondarySymptom
🪠 This has to be done 🪠
For the secondarySympto we changed the code from a switch to select-tab-group here a59dfa83 and so now the value is not a boolean anymore, as previously in components/settings/customization/index.js
:
const [shouldUseCervix, setShouldUseCervix] = useState(
useCervixObservable.value
)
...
<AppSwitch
onToggle={onCervixToggle}
text={cervixText}
value={shouldUseCervix}
/>
and in local-storage.js
:
export const useCervixObservable = Observable()
setObvWithInitValue('useCervix', useCervixObservable, false)
The change now defines it as an object in components/settings/customization/index.js
::
const secondarySymptomButtons = [
{
label: 'cervical mucus',
value: 0,
},
{
label: 'cervix',
value: 1,
},
]
and in local-storage.js
:
export const useCervixAsSecondarySymptomObservable = Observable()
setObvWithInitValue(
'useCervixAsSecondarySymptom',
useCervixAsSecondarySymptomObservable,
0
)
To ensure that people who have been using this switch before will have a smooth transition, (which is potentially everyone because the feature was enabled and set to cervical mucus for all), we wrote this commit d23b5fe4.
What has to be done?
To keep our code clean, we want to remove that commit d23b5fe4 once the code change is published on:
- as APK on dripapp.org
- Google Play
- AppStore
- Fdroid
12 months after the last publish of that code change.
⏳
Is it urgent? It is relevant for code hygiene, but not urgent. We want to remove code that is not used anymore for future maintainers who might get confused otherwise.
Which OS?
-
Android -
iOS
🎆
What should the ideal outcome be? Code hygiene.