From 54d0138b39eda93552d13b77a0e89f25c6c63bea Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Sun, 15 Jan 2023 20:32:10 +0100 Subject: [PATCH] Update Context.kt --- .../calendar/pro/extensions/Context.kt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) 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()