feat(contacts): drop {age} from default titles, disclaim it when added

A FREQ=YEARLY event has one static title, so {age} is only a sync-time snapshot
and can look wrong on far-future occurrences. Keep it out of the default
templates ({name}'s birthday / anniversary), and when a user does add {age} in
the title-format editor, show a short disclaimer about the snapshot behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-01 11:51:42 +02:00
parent 030c3e6ce1
commit 0fd579b19b
4 changed files with 19 additions and 5 deletions

View File

@@ -1251,6 +1251,16 @@ private fun SpecialDatesTemplateDialog(
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
// Only warn about {age}'s snapshot behaviour once the user has
// actually put it in the template.
if (text.contains("{age}")) {
Spacer(Modifier.height(8.dp))
Text(
text = stringResource(R.string.settings_special_dates_template_age_note),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.tertiary,
)
}
}
},
confirmButton = {