From e4bb254512b0aadd97384b0bbbe92bcd6952af9c Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Wed, 18 Nov 2026 21:01:11 +0100 Subject: [PATCH] Trim long inline comments from 1.4.0 (#101) --- .../agendula/data/reminders/ReminderPlanner.kt | 3 +-- .../agendula/domain/export/ICalendarWriter.kt | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/de/jeanlucmakiola/agendula/data/reminders/ReminderPlanner.kt b/app/src/main/java/de/jeanlucmakiola/agendula/data/reminders/ReminderPlanner.kt index 0f00bbe..205adf1 100644 --- a/app/src/main/java/de/jeanlucmakiola/agendula/data/reminders/ReminderPlanner.kt +++ b/app/src/main/java/de/jeanlucmakiola/agendula/data/reminders/ReminderPlanner.kt @@ -106,8 +106,7 @@ internal object ReminderPlanner { // day: other clients ring it at midnight, or at their own hour, // so a dismissal at 07:00 must still silence the 09:00 this // device would ring it at. - // Likewise one counting from a date without a time: other clients - // ring it at the midnight or last second it is stored as. + // Likewise one from a date without a time, which others ring as stored. val earliest = when { task.isAllDay && reminder.allDay.minuteOfDay == null -> triggerAt(anchor, true, reminder.minutesBefore, 0, zone) diff --git a/app/src/main/java/de/jeanlucmakiola/agendula/domain/export/ICalendarWriter.kt b/app/src/main/java/de/jeanlucmakiola/agendula/domain/export/ICalendarWriter.kt index 22925ea..4d3b8a6 100644 --- a/app/src/main/java/de/jeanlucmakiola/agendula/domain/export/ICalendarWriter.kt +++ b/app/src/main/java/de/jeanlucmakiola/agendula/domain/export/ICalendarWriter.kt @@ -121,16 +121,18 @@ object ICalendarWriter { line("END:VTODO") } + /** + * [end]'s date as [name]. A date without a time goes out as the wall clock + * alone, as UTC would move it to another day for whoever imports it + * elsewhere (#101); not a series' start, whose UNTIL and RDATE stay UTC and + * which RFC 5545 §3.3.10 would then want floating too: that one goes timed. + */ private fun StringBuilder.dateProperty(name: String, instant: Instant, task: ExportTask, end: TaskEnd) { if (task.isAllDay) { // Read in UTC, matching the storage convention (see AllDayTime): an // all-day value *is* UTC midnight of the intended calendar date. rawProperty("$name;VALUE=DATE", instant.calendarDate(allDay = true).format(DATE)) } else if (task.untimed == end && (end == TaskEnd.DUE || task.rrule.isNullOrBlank() && task.rdate.isNullOrBlank())) { - // A date without a time is the wall clock alone: UTC would move it to - // another day for whoever imports it elsewhere (#101). Not for the - // start of a series, whose UNTIL and RDATE stay UTC and §3.3.10 wants - // them floating alongside a floating start: that one goes out timed. val wall = untimedWall(end, instant.untimedDate(task.timeZone)) rawProperty("$name;${ICalValues.NO_TIME_PARAM}=TRUE", ICalValues.formatFloating(wall)) } else {