From 1add1fcadb7e4bf358fa5bef0e742df5223e42f4 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Sun, 2 Aug 2026 17:57:58 +0200 Subject: [PATCH] chore: re-pin floret-kit and pass allDay at the date call sites (#4) Reviewed-on: https://codeberg.org/jlmakiola/agendula/pulls/4 --- .../agendula/ui/detail/TaskDetailScreen.kt | 14 +++++++++----- .../agendula/ui/edit/TaskEditScreen.kt | 4 ++-- floret-kit | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/de/jeanlucmakiola/agendula/ui/detail/TaskDetailScreen.kt b/app/src/main/java/de/jeanlucmakiola/agendula/ui/detail/TaskDetailScreen.kt index f1ae23a..060f4f9 100644 --- a/app/src/main/java/de/jeanlucmakiola/agendula/ui/detail/TaskDetailScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/agendula/ui/detail/TaskDetailScreen.kt @@ -501,13 +501,17 @@ private fun taskWhenLines(task: Task): Pair? { val due = task.due return when { start != null && due != null -> { - val sameDay = start.formatDate() == due.formatDate() - val primary = if (sameDay) due.formatDate() else "${start.formatDate()} – ${due.formatDate()}" - val secondary = if (task.isAllDay) null else "${start.formatTime()} – ${due.formatTime()}" + val allDay = task.isAllDay + val sameDay = start.formatDate(allDay) == due.formatDate(allDay) + val primary = + if (sameDay) due.formatDate(allDay) + else "${start.formatDate(allDay)} – ${due.formatDate(allDay)}" + val secondary = if (allDay) null else "${start.formatTime()} – ${due.formatTime()}" primary to secondary } - due != null -> due.formatDate() to if (task.isAllDay) null else due.formatTime() - start != null -> start.formatDate() to if (task.isAllDay) null else start.formatTime() + due != null -> due.formatDate(task.isAllDay) to if (task.isAllDay) null else due.formatTime() + start != null -> + start.formatDate(task.isAllDay) to if (task.isAllDay) null else start.formatTime() else -> null } } diff --git a/app/src/main/java/de/jeanlucmakiola/agendula/ui/edit/TaskEditScreen.kt b/app/src/main/java/de/jeanlucmakiola/agendula/ui/edit/TaskEditScreen.kt index 5d09499..03e4e4e 100644 --- a/app/src/main/java/de/jeanlucmakiola/agendula/ui/edit/TaskEditScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/agendula/ui/edit/TaskEditScreen.kt @@ -653,7 +653,7 @@ private fun ScheduleRow( ) } else { Text( - text = value.formatDate(), + text = value.formatDate(allDay), style = MaterialTheme.typography.titleMedium, color = valueColor, modifier = Modifier.clickable(onClick = onPick).padding(vertical = 8.dp, horizontal = 6.dp), @@ -865,7 +865,7 @@ private fun ParentPickerSheet( GroupedRow( title = task.title.ifBlank { stringResource(R.string.task_untitled) }, position = positionOf(index, section.tasks.size), - summary = task.due?.formatDate(), + summary = task.due?.formatDate(task.isAllDay), selected = task.taskId == selectedId, minHeight = 56.dp, onClick = { choose(task.taskId) }, diff --git a/floret-kit b/floret-kit index 5a576c4..fc4ff6b 160000 --- a/floret-kit +++ b/floret-kit @@ -1 +1 @@ -Subproject commit 5a576c4d288e469a75c396b365e6ace8290aa3d0 +Subproject commit fc4ff6b7dc5a5602404e3e502502273475b179b5