mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-07 14:03:27 +01:00
Update Context.kt
This commit is contained in:
parent
0725eabcb2
commit
54d0138b39
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user