Commit c0f649ad authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Don't update queries which have moved to done in the meantime

parent e6d3020d
......@@ -141,11 +141,12 @@ class QueryListener(private val context: Context) : QueryListener {
database.runInTransaction {
currentInsertions.forEach { (key, value) ->
if (queryLogState[key]!!) {
dao.insert(value)
queryLogState[key] = true
} else {
dao.update(value)
when (queryLogState[key]) {
true -> {
dao.insert(value)
queryLogState[key] = true
}
false -> dao.update(value)
}
}
currentDoneInsertions.forEach { (key, value) ->
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment