Properly handle converting all-day recurring events to normal events
This commit is contained in:
parent
3b0cec263f
commit
6ede34c70e
|
@ -435,6 +435,13 @@ class CalDAVHelper(val context: Context) {
|
||||||
put(Events.RRULE, repeatRule)
|
put(Events.RRULE, repeatRule)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getIsAllDay()) {
|
||||||
|
event.toUtcAllDayEvent()
|
||||||
|
put(Events.ALL_DAY, 1)
|
||||||
|
} else {
|
||||||
|
put(Events.ALL_DAY, 0)
|
||||||
|
}
|
||||||
|
|
||||||
val parentEventId = event.parentId
|
val parentEventId = event.parentId
|
||||||
if (parentEventId != 0L) {
|
if (parentEventId != 0L) {
|
||||||
val parentEvent = context.eventsDB.getEventWithId(parentEventId) ?: return@apply
|
val parentEvent = context.eventsDB.getEventWithId(parentEventId) ?: return@apply
|
||||||
|
@ -454,13 +461,6 @@ class CalDAVHelper(val context: Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getIsAllDay()) {
|
|
||||||
event.toUtcAllDayEvent()
|
|
||||||
put(Events.ALL_DAY, 1)
|
|
||||||
} else {
|
|
||||||
put(Events.ALL_DAY, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
put(Events.DTSTART, event.startTS * 1000L)
|
put(Events.DTSTART, event.startTS * 1000L)
|
||||||
put(Events.EVENT_TIMEZONE, event.getTimeZoneString())
|
put(Events.EVENT_TIMEZONE, event.getTimeZoneString())
|
||||||
if (event.repeatInterval > 0) {
|
if (event.repeatInterval > 0) {
|
||||||
|
|
Loading…
Reference in New Issue