diff options
author | Allan Wang <me@allanwang.ca> | 2021-11-22 22:24:17 -0800 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2021-11-22 22:24:17 -0800 |
commit | 1dd7be9174f1740aa1cae29f6d62d6f83f5917ba (patch) | |
tree | 5734afee77ddd8ea498df7065a1ec3de28a387f7 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt | |
parent | eb2e0d07f278eb2079666ffabcbee007173c17af (diff) | |
download | frost-1dd7be9174f1740aa1cae29f6d62d6f83f5917ba.tar.gz frost-1dd7be9174f1740aa1cae29f6d62d6f83f5917ba.tar.bz2 frost-1dd7be9174f1740aa1cae29f6d62d6f83f5917ba.zip |
Migrate refresh channel to flow
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt index 61a76e70..372a7bad 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt @@ -51,7 +51,8 @@ class FrostChromeClient( private val webFileChooser: WebFileChooser, ) : WebChromeClient() { - private val refresh: SendChannel<Boolean> = web.parent.refreshChannel +// private val refresh: SendChannel<Boolean> = web.parent.refreshChannel + private val refreshEmit = web.parent.refreshEmit private val progress: SendChannel<Int> = web.parent.progressChannel private val title: SendChannel<String> = web.parent.titleChannel private val context = web.context!! @@ -87,7 +88,7 @@ class FrostChromeClient( private fun JsResult.frostCancel() { cancel() - refresh.offer(false) + refreshEmit(false) progress.offer(100) } |