Delete original event to avoid duplication

This commit is contained in:
Naveen 2023-06-24 19:42:13 +05:30
parent 05084ea330
commit fe09a937ec
No known key found for this signature in database
GPG Key ID: 0E155DAD31671DA3
2 changed files with 8 additions and 0 deletions

View File

@ -1382,6 +1382,10 @@ class EventActivity : SimpleActivity() {
mEvent.id = null
eventsHelper.apply {
addEventRepeatLimit(eventId, mEventOccurrenceTS)
if (mEventOccurrenceTS == originalEvent.startTS) {
deleteEvent(eventId, true)
}
insertEvent(mEvent, addToCalDAV = true, showToasts = true) {
finish()
}

View File

@ -495,6 +495,10 @@ class TaskActivity : SimpleActivity() {
mTask.id = null
eventsHelper.apply {
addEventRepeatLimit(taskId, mTaskOccurrenceTS)
if (mTaskOccurrenceTS == originalTask.startTS) {
deleteEvent(taskId, true)
}
insertTask(mTask, showToasts = true) {
finish()
}