mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
Update Context.kt
This commit is contained in:
@@ -713,16 +713,15 @@ fun Context.addImportIdsToTasks(callback: () -> Unit) {
|
|||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
var count = 0
|
var count = 0
|
||||||
|
|
||||||
eventsDB.getAllTasks()
|
eventsDB.getAllTasks().forEach { task ->
|
||||||
.forEach { task ->
|
if (task.importId.isEmpty()) {
|
||||||
if (task.importId.isEmpty()) {
|
eventsDB.updateTaskImportId(
|
||||||
eventsDB.updateTaskImportId(
|
importId = generateImportId(),
|
||||||
importId = generateImportId(),
|
id = task.id!!
|
||||||
id = task.id!!
|
)
|
||||||
)
|
count += 1
|
||||||
count += 1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
callback()
|
callback()
|
||||||
|
Reference in New Issue
Block a user