aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-12-28 20:19:18 -0500
committerAllan Wang <me@allanwang.ca>2018-12-28 20:19:18 -0500
commite5e83736d3feff8ac9cc4ae38fad0fa827a6b21d (patch)
tree248e2886613e6eb30ae2e4a1196da2a484371aee /app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
parentc970d707105bbb614a630a1ac7340d6044e8fee1 (diff)
downloadfrost-e5e83736d3feff8ac9cc4ae38fad0fa827a6b21d.tar.gz
frost-e5e83736d3feff8ac9cc4ae38fad0fa827a6b21d.tar.bz2
frost-e5e83736d3feff8ac9cc4ae38fad0fa827a6b21d.zip
Switch remaining primary observables
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.kt7
1 files changed, 1 insertions, 6 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 f3538ec3..da90e7e5 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
@@ -29,9 +29,6 @@ import com.pitchedapps.frost.contracts.ActivityContract
import com.pitchedapps.frost.utils.L
import com.pitchedapps.frost.utils.frostSnackbar
import com.pitchedapps.frost.views.FrostWebView
-import io.reactivex.subjects.BehaviorSubject
-import io.reactivex.subjects.Subject
-import kotlinx.coroutines.channels.ReceiveChannel
import kotlinx.coroutines.channels.SendChannel
/**
@@ -47,7 +44,6 @@ class FrostChromeClient(web: FrostWebView) : WebChromeClient() {
private val progress: SendChannel<Int> = web.parent.progressChannel
private val title: SendChannel<String> = web.parent.titleChannel
- private var prevTitle: String? = null
private val activity = (web.context as? ActivityContract)
private val context = web.context!!
@@ -58,8 +54,7 @@ class FrostChromeClient(web: FrostWebView) : WebChromeClient() {
override fun onReceivedTitle(view: WebView, title: String) {
super.onReceivedTitle(view, title)
- if (title.startsWith("http") || prevTitle == title) return
- prevTitle = title
+ if (title.startsWith("http")) return
this.title.offer(title)
}