From 7edb6c6b96a376f9c2e14dc4785ca3bb7eebbc2e Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 4 Dec 2017 13:58:23 +0100 Subject: [PATCH] fix #233, properly import multiple events in a row with empty importID --- .../com/simplemobiletools/calendar/helpers/IcsImporter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/IcsImporter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/IcsImporter.kt index f02b02a27..71f6b3210 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/IcsImporter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/IcsImporter.kt @@ -117,7 +117,7 @@ class IcsImporter(val activity: SimpleActivity) { if (curTitle.isEmpty() || curStart == -1) continue - val eventToUpdate = existingEvents.firstOrNull { curImportId == it.importId } + val eventToUpdate = existingEvents.firstOrNull { curImportId.isNotEmpty() && curImportId == it.importId } if (eventToUpdate != null && eventToUpdate.lastUpdated >= curLastModified) { continue }