aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-12-28 21:12:07 -0500
committerAllan Wang <me@allanwang.ca>2018-12-28 21:12:07 -0500
commit5393f171e4b489b90fa93df1b23288178d9daaef (patch)
treea2490479f4d639553657509f2414c4660b491c62 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
parent1e2fc927b10ae933005afa12ceb7a2832af4b95b (diff)
downloadfrost-5393f171e4b489b90fa93df1b23288178d9daaef.tar.gz
frost-5393f171e4b489b90fa93df1b23288178d9daaef.tar.bz2
frost-5393f171e4b489b90fa93df1b23288178d9daaef.zip
Update badge channel
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.kt5
1 files changed, 2 insertions, 3 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 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<String>? = activity?.headerBadgeObservable
+ private val header: SendChannel<String>? = activity?.headerBadgeChannel
private val refresh: SendChannel<Boolean> = 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)
}
}