diff options
author | Allan Wang <me@allanwang.ca> | 2018-12-27 14:34:29 -0500 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2018-12-27 14:34:29 -0500 |
commit | f9e3a324e47a81a30aade003cf6f829d03c81414 (patch) | |
tree | 655a7fc8894170716986a0cab1c784822d750f6f /app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | |
parent | e6dcbd7b32dc49b11184b6beca598819c3f071fd (diff) | |
download | frost-f9e3a324e47a81a30aade003cf6f829d03c81414.tar.gz frost-f9e3a324e47a81a30aade003cf6f829d03c81414.tar.bz2 frost-f9e3a324e47a81a30aade003cf6f829d03c81414.zip |
Convert remaining view observables
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 5 |
1 files changed, 3 insertions, 2 deletions
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<String>? = activity?.headerBadgeObservable - private val refresh: Subject<Boolean> = web.parent.refreshObservable + private val refresh: SendChannel<Boolean> = 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 |