Properly handle converting all-day recurring events to normal events

This commit is contained in:
Naveen 2023-06-16 04:09:26 +05:30
parent 3b0cec263f
commit 6ede34c70e
No known key found for this signature in database
GPG Key ID: 0E155DAD31671DA3
1 changed files with 7 additions and 7 deletions

View File

@ -435,6 +435,13 @@ class CalDAVHelper(val context: Context) {
put(Events.RRULE, repeatRule)
}
if (event.getIsAllDay()) {
event.toUtcAllDayEvent()
put(Events.ALL_DAY, 1)
} else {
put(Events.ALL_DAY, 0)
}
val parentEventId = event.parentId
if (parentEventId != 0L) {
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.EVENT_TIMEZONE, event.getTimeZoneString())
if (event.repeatInterval > 0) {