chore: re-pin floret-kit and pass allDay at the date call sites (#4)

Reviewed-on: https://codeberg.org/jlmakiola/agendula/pulls/4
This commit is contained in:
Jean-Luc Makiola
2026-08-02 17:57:58 +02:00
parent 217d5d7afd
commit 1add1fcadb
3 changed files with 12 additions and 8 deletions

View File

@@ -501,13 +501,17 @@ private fun taskWhenLines(task: Task): Pair<String, String?>? {
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
}
}

View File

@@ -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) },