Chore: Merge exclude functionality with latest main
This commit is contained in:
@@ -117,15 +117,23 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
|
|||||||
style: styles.input,
|
style: styles.input,
|
||||||
textAlignVertical: 'top',
|
textAlignVertical: 'top',
|
||||||
}
|
}
|
||||||
const excludeToggle = shouldShow(symptomConfig.excludeText) && (
|
|
||||||
<Segment style={styles.segmentBorder}>
|
{
|
||||||
<AppSwitch
|
/* show exclude AppSwitch for bleeding, mucus, cervix, temperature */
|
||||||
onToggle={onExcludeToggle}
|
}
|
||||||
text={symptomPage[symptom].excludeText}
|
{
|
||||||
value={data.exclude}
|
/* but if fertility is off only for bleeding */
|
||||||
/>
|
}
|
||||||
</Segment>
|
const excludeToggle = shouldShow(symptomConfig.excludeText) &&
|
||||||
)
|
(isBleeding || isFertilityTrackingEnabled) && (
|
||||||
|
<Segment style={styles.segmentBorder}>
|
||||||
|
<AppSwitch
|
||||||
|
onToggle={onExcludeToggle}
|
||||||
|
text={symptomPage[symptom].excludeText}
|
||||||
|
value={data.exclude}
|
||||||
|
/>
|
||||||
|
</Segment>
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppModal onClose={onSave}>
|
<AppModal onClose={onSave}>
|
||||||
@@ -189,18 +197,6 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
|
|||||||
</Segment>
|
</Segment>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
{/* show exclude AppSwitch for bleeding, mucus, cervix, temperature */}
|
|
||||||
{/* but if fertility is off only for bleeding */}
|
|
||||||
{shouldShow(symptomConfig.excludeText) &&
|
|
||||||
(symptom === 'bleeding' || isFertilityTrackingEnabled) && (
|
|
||||||
<Segment style={styles.segmentBorder}>
|
|
||||||
<AppSwitch
|
|
||||||
onToggle={onExcludeToggle}
|
|
||||||
text={symptomPage[symptom].excludeText}
|
|
||||||
value={data.exclude}
|
|
||||||
/>
|
|
||||||
</Segment>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{!isBleeding && excludeToggle}
|
{!isBleeding && excludeToggle}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user