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

Assign an ID if none is currently set

parent 2e341e0d
......@@ -144,7 +144,7 @@ class QueryListener(private val context: Context) : QueryListener {
// Do nothing for 1 (no update to process)
when (queryLogState[key]) {
0 -> {
value.id = nextQueryId++
if(value.id == 0L) value.id = nextQueryId++
dao.insert(value)
queryLogState[key] = 1
}
......@@ -157,7 +157,7 @@ class QueryListener(private val context: Context) : QueryListener {
currentDoneInsertions.forEach { (key, value) ->
if (value) dao.update(key)
else {
key.id = nextQueryId++
if(key.id == 0L) key.id = nextQueryId++
dao.insert(key)
}
}
......
Markdown is supported
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