fix some ics importing related glitches
This commit is contained in:
parent
43147df0aa
commit
ce134aad28
|
@ -166,6 +166,7 @@ class IcsImporter(val activity: SimpleActivity) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curTitle.isEmpty() || curStart == -1L) {
|
if (curTitle.isEmpty() || curStart == -1L) {
|
||||||
|
line = curLine
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,6 +174,7 @@ class IcsImporter(val activity: SimpleActivity) {
|
||||||
val eventToUpdate = existingEvents.filter { curImportId.isNotEmpty() && curImportId == it.importId }.sortedByDescending { it.lastUpdated }.firstOrNull()
|
val eventToUpdate = existingEvents.filter { curImportId.isNotEmpty() && curImportId == it.importId }.sortedByDescending { it.lastUpdated }.firstOrNull()
|
||||||
if (eventToUpdate != null && eventToUpdate.lastUpdated >= curLastModified) {
|
if (eventToUpdate != null && eventToUpdate.lastUpdated >= curLastModified) {
|
||||||
eventsAlreadyExist++
|
eventsAlreadyExist++
|
||||||
|
line = curLine
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,6 +200,7 @@ class IcsImporter(val activity: SimpleActivity) {
|
||||||
event.importId = event.hashCode().toString()
|
event.importId = event.hashCode().toString()
|
||||||
if (existingEvents.map { it.importId }.contains(event.importId)) {
|
if (existingEvents.map { it.importId }.contains(event.importId)) {
|
||||||
eventsAlreadyExist++
|
eventsAlreadyExist++
|
||||||
|
line = curLine
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue