From 36391b352cdb96afb26bbdb63e6ef3359eca41e9 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Fri, 13 Nov 2026 12:41:59 +0100 Subject: [PATCH] Timeline title: name and docs cover the day view (#501) --- .../calendula/ui/common/CalendarTitle.kt | 5 +++-- .../de/jeanlucmakiola/calendula/ui/week/WeekScreen.kt | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/CalendarTitle.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/CalendarTitle.kt index 781fad50..ccac0372 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/CalendarTitle.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/CalendarTitle.kt @@ -8,8 +8,9 @@ import java.util.Locale * out in [locale]'s own order, with the year shown only when [date] falls outside * [currentYear]. * - * Pass [skeleton] *without* a year field, e.g. "LLLL" for a month. A skeleton is a field list, so wanting the year is just asking for one - * more field; the locale still decides where it lands ("July 2026" vs "2026年7月"). + * Pass [skeleton] *without* a year field, e.g. "LLLL" for a month. A skeleton + * is a field list, so wanting the year is just asking for one more field; the + * locale still decides where it lands ("July 2026" vs "2026年7月"). * * Dropping the year in the current year is the one bit of policy here: the title * sits directly above a grid that already says which year it is, and the year's diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/week/WeekScreen.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/week/WeekScreen.kt index b261e4a4..9fde6833 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/week/WeekScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/week/WeekScreen.kt @@ -484,10 +484,10 @@ private fun PagedTimelineScreen( val jumpToToday = { jumpToDate(today) } val locale = currentLocale() - // Every timeline names the month, the day view too: its header already shows weekday and date (#501). + // The day view names the month too: its header already shows weekday and date (#501). val (title, shortTitle) = remember(weekStart, weekEnd, locale, today.year) { - formatWeekTitle(weekStart, weekEnd, locale, today.year, abbreviated = false) to - formatWeekTitle(weekStart, weekEnd, locale, today.year, abbreviated = true) + formatTimelineTitle(weekStart, weekEnd, locale, today.year, abbreviated = false) to + formatTimelineTitle(weekStart, weekEnd, locale, today.year, abbreviated = true) } PublishChrome( ScreenChrome( @@ -2009,7 +2009,7 @@ private fun minToHm(min: Int, is24Hour: Boolean, locale: java.util.Locale): Stri formatMinuteOfDay(min, is24Hour, locale) /** - * The week's title: just the month [weekStart] falls in. + * Every timeline's title, the day view's included: just the month [weekStart] falls in. * * The day numbers are already in the column headers directly below, so spelling * out "13.–19. Jul" restates them in the widest string in the bar. Naming the @@ -2024,7 +2024,7 @@ private fun minToHm(min: Int, is24Hour: Boolean, locale: java.util.Locale): Stri * "December" with no year would be actively misleading while the reader is * looking straight at January dates. */ -private fun formatWeekTitle( +private fun formatTimelineTitle( weekStart: LocalDate, weekEnd: LocalDate, locale: Locale,