diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt index 9135c0211..36538d89f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt @@ -713,16 +713,15 @@ fun Context.addImportIdsToTasks(callback: () -> Unit) { ensureBackgroundThread { var count = 0 - eventsDB.getAllTasks() - .forEach { task -> - if (task.importId.isEmpty()) { - eventsDB.updateTaskImportId( - importId = generateImportId(), - id = task.id!! - ) - count += 1 - } + eventsDB.getAllTasks().forEach { task -> + if (task.importId.isEmpty()) { + eventsDB.updateTaskImportId( + importId = generateImportId(), + id = task.id!! + ) + count += 1 } + } if (count > 0) { callback()