Skip to content

Commit a84ae18

Browse files
Add more description on no symptom usage
1 parent 00b029f commit a84ae18

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

app/lib/screens/settings/period_settings_screen.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,15 @@ class _PeriodSettingsScreenState extends State<PeriodSettingsScreen> {
106106
final l10n = AppLocalizations.of(context)!;
107107
final symptomUsageCount = await periodsRepo.getSymptomUseCount(symptom);
108108

109-
var description = "'$symptom' will no longer be available when logging a period.";
109+
var description = "'$symptom' will no longer be available when logging a period.\n\n";
110110

111-
if (symptomUsageCount == 1) {
112-
description += "\n\nThere is already $symptomUsageCount period log with this symptom!\nThis log will not be changed.";
111+
if (symptomUsageCount == 0) {
112+
description += "There are currently no period logs with this symptom!";
113+
}
114+
else if (symptomUsageCount == 1) {
115+
description += "There is already $symptomUsageCount period log with this symptom!\nThis log will not be changed.";
113116
} else if (symptomUsageCount > 1) {
114-
description += "\n\nThere are $symptomUsageCount period logs with this symptom!\nThese logs will not be changed.";
117+
description += "There are $symptomUsageCount period logs with this symptom!\nThese logs will not be changed.";
115118
}
116119

117120
if (mounted) {

0 commit comments

Comments
 (0)