From 1ddce648a2ca75ac842e914e964fc417e365adae Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 19 Feb 2017 19:13:06 +0100 Subject: [PATCH] avoid importing the same event twice, if its twice in the ics file --- .../kotlin/com/simplemobiletools/calendar/helpers/IcsParser.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/IcsParser.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/IcsParser.kt index 3c7eb438a..5a1a14783 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/IcsParser.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/IcsParser.kt @@ -84,6 +84,7 @@ class IcsParser { if (curTitle.isEmpty() || curStart == -1 || curEnd == -1 || importIDs.contains(curImportId)) continue + importIDs.add(curImportId) val event = Event(0, curStart, curEnd, curTitle, curDescription, curReminderMinutes, -1, -1, importId = curImportId, flags = curFlags) dbHelper.insert(event) { } eventsImported++