mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-30 10:25:01 +01:00
fix #466, replace empty repetition rule with null at non-repeating events
This commit is contained in:
parent
42ddaa6b49
commit
a350396ece
@ -358,11 +358,17 @@ class CalDAVHandler(val context: Context) {
|
||||
put(CalendarContract.Events.DESCRIPTION, event.description)
|
||||
put(CalendarContract.Events.DTSTART, event.startTS * 1000L)
|
||||
put(CalendarContract.Events.ALL_DAY, if (event.getIsAllDay()) 1 else 0)
|
||||
put(CalendarContract.Events.RRULE, Parser().getRepeatCode(event))
|
||||
put(CalendarContract.Events.EVENT_TIMEZONE, TimeZone.getDefault().toString())
|
||||
put(CalendarContract.Events.EVENT_LOCATION, event.location)
|
||||
put(CalendarContract.Events.STATUS, CalendarContract.Events.STATUS_CONFIRMED)
|
||||
|
||||
val repeatRule = Parser().getRepeatCode(event)
|
||||
if (repeatRule.isEmpty()) {
|
||||
putNull(CalendarContract.Events.RRULE)
|
||||
} else {
|
||||
put(CalendarContract.Events.RRULE, repeatRule)
|
||||
}
|
||||
|
||||
if (event.getIsAllDay() && event.endTS > event.startTS)
|
||||
event.endTS += DAY
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user