Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
PublicAndroidApps
Nebulo
Commits
e8e6b8a8
Commit
e8e6b8a8
authored
Nov 27, 2019
by
Daniel Wolf
Browse files
Assign an ID if none is currently set
parent
2e341e0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/smokescreen/util/proxy/QueryListener.kt
View file @
e8e6b8a8
...
...
@@ -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
)
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment