From 5393f171e4b489b90fa93df1b23288178d9daaef Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 28 Dec 2018 21:12:07 -0500 Subject: Update badge channel --- app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt index 3945a9a0..4611d27d 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt @@ -29,7 +29,6 @@ import com.pitchedapps.frost.utils.isIndependent import com.pitchedapps.frost.utils.launchImageActivity import com.pitchedapps.frost.utils.showWebContextMenu import com.pitchedapps.frost.views.FrostWebView -import io.reactivex.subjects.Subject import kotlinx.coroutines.channels.SendChannel /** @@ -39,7 +38,7 @@ class FrostJSI(val web: FrostWebView) { private val context = web.context private val activity = context as? MainActivity - private val header: Subject? = activity?.headerBadgeObservable + private val header: SendChannel? = activity?.headerBadgeChannel private val refresh: SendChannel = web.parent.refreshChannel private val cookies = activity?.cookies() ?: arrayListOf() @@ -133,6 +132,6 @@ class FrostJSI(val web: FrostWebView) { @JavascriptInterface fun handleHeader(html: String?) { html ?: return - header?.onNext(html) + header?.offer(html) } } -- cgit v1.2.3