From 4ad1c09f8fe6ec638d2cb517fcb2d838092ca441 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Mon, 22 Jun 2026 23:00:34 +0200 Subject: [PATCH] feat(detail): show attendee email under the name The attendee row only used the email as a fallback when the name was blank, so a guest with both a name and an email never showed the email. Add it as a supporting line (bodySmall / onSurfaceVariant) beneath the name, kept off rows whose headline already falls back to the email. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../calendula/ui/detail/EventDetailScreen.kt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/detail/EventDetailScreen.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/detail/EventDetailScreen.kt index e19ca18..c3e4d0c 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/detail/EventDetailScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/detail/EventDetailScreen.kt @@ -590,10 +590,22 @@ private fun AttendeeRow(attendee: Attendee) { verticalAlignment = Alignment.CenterVertically, ) { Column(modifier = Modifier.weight(1f)) { + val hasName = attendee.name.isNotBlank() Text( - text = attendee.name.ifBlank { attendee.email.orEmpty() }, + text = if (hasName) attendee.name else attendee.email.orEmpty(), style = MaterialTheme.typography.bodyMedium, ) + // Email as supporting text — only when the name is the headline, so we + // don't repeat it on rows that already fall back to the email above. + if (hasName) { + attendee.email?.takeIf { it.isNotBlank() }?.let { email -> + Text( + text = email, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } attendeeRoleLabel(attendee)?.let { roleRes -> Text( text = stringResource(roleRes),