diff options
author | Allan Wang <me@allanwang.ca> | 2021-11-22 22:53:00 -0800 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2021-11-22 22:53:00 -0800 |
commit | 779ec08188f4bda736b3e0f2940570f1f7eb49e1 (patch) | |
tree | 2bbff3f522055f01fc8ad5074e619d739017ddef /app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt | |
parent | 1dd7be9174f1740aa1cae29f6d62d6f83f5917ba (diff) | |
download | frost-779ec08188f4bda736b3e0f2940570f1f7eb49e1.tar.gz frost-779ec08188f4bda736b3e0f2940570f1f7eb49e1.tar.bz2 frost-779ec08188f4bda736b3e0f2940570f1f7eb49e1.zip |
Migrate progress 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 | 6 |
1 files changed, 3 insertions, 3 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 372a7bad..9f2437b0 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt @@ -53,7 +53,7 @@ class FrostChromeClient( // private val refresh: SendChannel<Boolean> = web.parent.refreshChannel private val refreshEmit = web.parent.refreshEmit - private val progress: SendChannel<Int> = web.parent.progressChannel + private val progressEmit = web.parent.progressEmit private val title: SendChannel<String> = web.parent.titleChannel private val context = web.context!! @@ -74,7 +74,7 @@ class FrostChromeClient( override fun onProgressChanged(view: WebView, newProgress: Int) { super.onProgressChanged(view, newProgress) - progress.offer(newProgress) + progressEmit(newProgress) } override fun onShowFileChooser( @@ -89,7 +89,7 @@ class FrostChromeClient( private fun JsResult.frostCancel() { cancel() refreshEmit(false) - progress.offer(100) + progressEmit(100) } override fun onJsAlert( |