From d766100c297bc094491de150f24c04719ffa8f4e Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 18 Jan 2018 23:23:56 -0500 Subject: Enhancement/speed up (#650) * Revert back to m.facebook * Add initial speedup * Update theme * Fix link press for event status * Move web states to fb const * Fix images and email * Fix up flyweight for requests * Ensure frost request is synchronous * Prepare diff utils * Improve speed and fix blank overlay * Update comments * Add debugger and fix searchview * Theme discover pages. Resolves #654 * Fix duplicate reload * Fix image loading * Update changelog * Update tests * Rename test Update dependencies Update gitignore --- app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 6 ++++++ 1 file changed, 6 insertions(+) (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 9264ea52..d735fd50 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt @@ -17,6 +17,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 cookies = activity?.cookies() ?: arrayListOf() /** @@ -88,6 +89,11 @@ class FrostJSI(val web: FrostWebView) { web.post { web.frostWebClient.emit(flag) } } + @JavascriptInterface + fun isReady() { + refresh.onNext(false) + } + @JavascriptInterface fun handleHtml(html: String?) { html ?: return -- cgit v1.2.3