fix #233, properly import multiple events in a row with empty importID

This commit is contained in:
tibbi 2017-12-04 13:58:23 +01:00
parent 426313bb17
commit 7edb6c6b96

View File

@ -117,7 +117,7 @@ class IcsImporter(val activity: SimpleActivity) {
if (curTitle.isEmpty() || curStart == -1) if (curTitle.isEmpty() || curStart == -1)
continue continue
val eventToUpdate = existingEvents.firstOrNull { curImportId == it.importId } val eventToUpdate = existingEvents.firstOrNull { curImportId.isNotEmpty() && curImportId == it.importId }
if (eventToUpdate != null && eventToUpdate.lastUpdated >= curLastModified) { if (eventToUpdate != null && eventToUpdate.lastUpdated >= curLastModified) {
continue continue
} }