insert event repetition exceptions through eventsHelper
This commit is contained in:
parent
e4be55a797
commit
9813ddd6de
|
@ -232,7 +232,7 @@ class CalDAVHelper(val context: Context) {
|
||||||
if (parentEvent != null && !parentEvent.repetitionExceptions.contains(originalDayCode)) {
|
if (parentEvent != null && !parentEvent.repetitionExceptions.contains(originalDayCode)) {
|
||||||
event.parentId = parentEvent.id!!
|
event.parentId = parentEvent.id!!
|
||||||
parentEvent.addRepetitionException(originalDayCode)
|
parentEvent.addRepetitionException(originalDayCode)
|
||||||
activity!!.eventsDB.insertOrUpdate(parentEvent)
|
eventsHelper.insertEvent(null, parentEvent, false)
|
||||||
|
|
||||||
event.parentId = parentEvent.id!!
|
event.parentId = parentEvent.id!!
|
||||||
eventsHelper.insertEvent(null, event, false)
|
eventsHelper.insertEvent(null, event, false)
|
||||||
|
|
|
@ -174,7 +174,8 @@ class IcsImporter(val activity: SimpleActivity) {
|
||||||
val parentEvent = activity.eventsDB.getEventWithImportId(event.importId)
|
val parentEvent = activity.eventsDB.getEventWithImportId(event.importId)
|
||||||
if (parentEvent != null && !parentEvent.repetitionExceptions.contains(curRecurrenceDayCode)) {
|
if (parentEvent != null && !parentEvent.repetitionExceptions.contains(curRecurrenceDayCode)) {
|
||||||
parentEvent.addRepetitionException(curRecurrenceDayCode)
|
parentEvent.addRepetitionException(curRecurrenceDayCode)
|
||||||
activity.eventsDB.insertOrUpdate(parentEvent)
|
eventsHelper.insertEvent(null, parentEvent, true)
|
||||||
|
|
||||||
event.parentId = parentEvent.id!!
|
event.parentId = parentEvent.id!!
|
||||||
eventsToInsert.add(event)
|
eventsToInsert.add(event)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue