aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-19 15:31:10 -0700
committerAllan Wang <me@allanwang.ca>2017-06-19 15:31:10 -0700
commit382433780c3f4403723a78e409cb161c9fad5034 (patch)
tree1138696bdd6e04d2227acaa4ab19ee8b85b4d2f8 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
parent0720413ee859762fc4c2d8748ba10402dffd0be7 (diff)
downloadfrost-382433780c3f4403723a78e409cb161c9fad5034.tar.gz
frost-382433780c3f4403723a78e409cb161c9fad5034.tar.bz2
frost-382433780c3f4403723a78e409cb161c9fad5034.zip
Parse header badges
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
index 0fe3304a..d015e22e 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
@@ -3,7 +3,10 @@ package com.pitchedapps.frost.web
import android.content.Context
import android.graphics.Bitmap
import android.view.KeyEvent
-import android.webkit.*
+import android.webkit.WebResourceRequest
+import android.webkit.WebResourceResponse
+import android.webkit.WebView
+import android.webkit.WebViewClient
import com.pitchedapps.frost.LoginActivity
import com.pitchedapps.frost.MainActivity
import com.pitchedapps.frost.SelectorActivity
@@ -50,7 +53,7 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : WebViewClient() {
refreshObservable.onNext(false)
return
}
- JsActions.LOGIN_CHECK.inject(view)
+ view.jsInject(JsActions.LOGIN_CHECK, JsAssets.HEADER_BADGES.maybe(webCore.baseEnum != null))
onPageFinishedActions(url)
}
@@ -62,7 +65,7 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : WebViewClient() {
L.d("Page finished reveal")
webCore.jsInject(CssHider.HEADER,
Prefs.themeInjector,
-// JsAssets.CLICK_INTERCEPTOR,
+ // JsAssets.CLICK_INTERCEPTOR,
callback = {
refreshObservable.onNext(false)
})