insert event repetition exceptions through eventsHelper

This commit is contained in:
tibbi 2018-12-04 16:27:55 +01:00
parent e4be55a797
commit 9813ddd6de
2 changed files with 3 additions and 2 deletions

View File

@ -232,7 +232,7 @@ class CalDAVHelper(val context: Context) {
if (parentEvent != null && !parentEvent.repetitionExceptions.contains(originalDayCode)) {
event.parentId = parentEvent.id!!
parentEvent.addRepetitionException(originalDayCode)
activity!!.eventsDB.insertOrUpdate(parentEvent)
eventsHelper.insertEvent(null, parentEvent, false)
event.parentId = parentEvent.id!!
eventsHelper.insertEvent(null, event, false)

View File

@ -174,7 +174,8 @@ class IcsImporter(val activity: SimpleActivity) {
val parentEvent = activity.eventsDB.getEventWithImportId(event.importId)
if (parentEvent != null && !parentEvent.repetitionExceptions.contains(curRecurrenceDayCode)) {
parentEvent.addRepetitionException(curRecurrenceDayCode)
activity.eventsDB.insertOrUpdate(parentEvent)
eventsHelper.insertEvent(null, parentEvent, true)
event.parentId = parentEvent.id!!
eventsToInsert.add(event)
}