Update Context.kt

This commit is contained in:
Tibor Kaputa 2023-01-15 20:32:10 +01:00 committed by GitHub
parent 0725eabcb2
commit 54d0138b39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 9 deletions

View File

@ -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()