From 7549beb8147fdf3252645470563bb92f7d10fc0f Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 21 Aug 2017 15:08:56 +0200 Subject: [PATCH] properly handle updating event importId at moving event to a different calendar --- .../simplemobiletools/calendar/helpers/CalDAVEventsHandler.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/CalDAVEventsHandler.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/CalDAVEventsHandler.kt index 387b487b6..6eb13eff0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/CalDAVEventsHandler.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/CalDAVEventsHandler.kt @@ -166,6 +166,8 @@ class CalDAVEventsHandler(val context: Context) { val uri = CalendarContract.Events.CONTENT_URI val values = fillEventContentValues(event) val eventRemoteID = event.getCalDAVEventId() + event.importId = getCalDAVEventImportId(event.getCalDAVCalendarId(), eventRemoteID) + val newUri = ContentUris.withAppendedId(uri, eventRemoteID) context.contentResolver.update(newUri, values, null, null)