aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-11-22 22:57:55 -0800
committerAllan Wang <me@allanwang.ca>2021-11-22 22:57:55 -0800
commitbbfac885b89a79af2c85f5f0df7635770b49a07a (patch)
treed806571943a490bb7b88224a3d246933c1516e90 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
parent779ec08188f4bda736b3e0f2940570f1f7eb49e1 (diff)
downloadfrost-bbfac885b89a79af2c85f5f0df7635770b49a07a.tar.gz
frost-bbfac885b89a79af2c85f5f0df7635770b49a07a.tar.bz2
frost-bbfac885b89a79af2c85f5f0df7635770b49a07a.zip
Convert title 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.kt5
1 files changed, 2 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 9f2437b0..90345aa2 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
@@ -34,7 +34,6 @@ import com.pitchedapps.frost.contracts.WebFileChooser
import com.pitchedapps.frost.injectors.ThemeProvider
import com.pitchedapps.frost.utils.L
import com.pitchedapps.frost.views.FrostWebView
-import kotlinx.coroutines.channels.SendChannel
/**
* Created by Allan Wang on 2017-05-31.
@@ -54,7 +53,7 @@ class FrostChromeClient(
// private val refresh: SendChannel<Boolean> = web.parent.refreshChannel
private val refreshEmit = web.parent.refreshEmit
private val progressEmit = web.parent.progressEmit
- private val title: SendChannel<String> = web.parent.titleChannel
+ private val titleEmit = web.parent.titleEmit
private val context = web.context!!
override fun getDefaultVideoPoster(): Bitmap? =
@@ -69,7 +68,7 @@ class FrostChromeClient(
override fun onReceivedTitle(view: WebView, title: String) {
super.onReceivedTitle(view, title)
if (title.startsWith("http")) return
- this.title.offer(title)
+ titleEmit(title)
}
override fun onProgressChanged(view: WebView, newProgress: Int) {