mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
update labels on webview when labels change
This commit is contained in:
parent
21ab6dd9cd
commit
953622e504
1 changed files with 6 additions and 0 deletions
|
|
@ -357,6 +357,12 @@ class WebReaderViewModel @Inject constructor(
|
|||
slug?.let {
|
||||
loadItemFromDB(it)
|
||||
}
|
||||
|
||||
// Send labels to webview
|
||||
val script = "var event = new Event('updateLabels');event.labels = ${Gson().toJson(labels)};document.dispatchEvent(event);"
|
||||
CoroutineScope(Dispatchers.Main).launch {
|
||||
enqueueScript(script)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue