From b532c7852ee3925163f0099c440e150b103a290c Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 14 Nov 2018 10:01:47 +0100 Subject: [PATCH] try fixing the glitch with multiple CalDAV synced event copies --- .../simplemobiletools/calendar/pro/helpers/CalDAVHandler.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHandler.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHandler.kt index 2bc202cf8..33a9ab783 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHandler.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHandler.kt @@ -240,9 +240,8 @@ class CalDAVHandler(val context: Context) { } if (title.isNotEmpty()) { - context.dbHelper.insert(event, false) { - importIdsMap[event.importId] = event - } + importIdsMap[event.importId] = event + context.dbHelper.insert(event, false) {} } } } while (cursor.moveToNext())