From 52816b327af405d0a3d2a0b72974ea6cf63ca255 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Wed, 1 Jul 2026 12:54:11 +0200 Subject: [PATCH] feat(contacts): per-type title format in the special-dates section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "Title format" row was only editable for Birthdays; move it into each per-type card so Anniversaries and Other dates get their own editable template too (the dialog was already keyed by type). Each enabled type card now reads toggle → title format → reminders. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../calendula/ui/settings/SettingsScreen.kt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/settings/SettingsScreen.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/settings/SettingsScreen.kt index 4c0b4a3..f5ad659 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/settings/SettingsScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/settings/SettingsScreen.kt @@ -1147,7 +1147,8 @@ private fun SpecialDatesScreen( ) if (state.enabled) { - // Per-type card: the toggle, and while on, its calendar-wide reminder. + // Per-type card: the toggle, and while on, its title format and its + // calendar-wide reminder. SpecialDateType.entries.forEachIndexed { index, type -> Spacer(Modifier.height(if (index == 0) 24.dp else 16.dp)) val on = type in state.types @@ -1168,6 +1169,12 @@ private fun SpecialDatesScreen( }, ) if (on) { + GroupedRow( + title = stringResource(R.string.settings_special_dates_template), + summary = state.titleTemplates[type].orEmpty(), + position = Position.Middle, + onClick = { editTemplate = type }, + ) GroupedRow( title = stringResource(R.string.settings_special_dates_reminders), summary = reminderChoiceLabel(specialDatesReminderMinutes(state.reminderChoices[type])), @@ -1177,14 +1184,6 @@ private fun SpecialDatesScreen( } } - Spacer(Modifier.height(24.dp)) - GroupedRow( - title = stringResource(R.string.settings_special_dates_template), - summary = state.titleTemplates[SpecialDateType.Birthday].orEmpty(), - position = Position.Alone, - onClick = { editTemplate = SpecialDateType.Birthday }, - ) - Spacer(Modifier.height(24.dp)) GroupedRow( title = stringResource(R.string.settings_special_dates_show_age),