From f9e3a324e47a81a30aade003cf6f829d03c81414 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 27 Dec 2018 14:34:29 -0500 Subject: Convert remaining view observables --- app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 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 2afb28c9..3945a9a0 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt @@ -30,6 +30,7 @@ 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 /** * Created by Allan Wang on 2017-06-01. @@ -39,7 +40,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 refresh: Subject = web.parent.refreshObservable + private val refresh: SendChannel = web.parent.refreshChannel private val cookies = activity?.cookies() ?: arrayListOf() /** @@ -120,7 +121,7 @@ class FrostJSI(val web: FrostWebView) { @JavascriptInterface fun isReady() { - refresh.onNext(false) + refresh.offer(false) } @JavascriptInterface -- cgit v1.2.3