diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt index 3f761bf0e..04dbbb7c7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt @@ -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) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt index 21001d23c..0239c1d71 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt @@ -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) }