Trim long inline comments from 1.4.0 (#101)
This commit is contained in:
1 parent
b957b20f10
commit
e4bb254512
2 files changed
+7
-6
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user