aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClientMenu.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-16 12:21:12 -0700
committerAllan Wang <me@allanwang.ca>2017-06-16 12:21:12 -0700
commit87e7e132a060e235d434a9ef44ae0363d7ef660b (patch)
treeba78c3240c6e4c0bf4ad43692f8625bc7f964a75 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClientMenu.kt
parentb9ea80d5b5a06d050ce2c7ca46ed597f4cb499ff (diff)
downloadfrost-87e7e132a060e235d434a9ef44ae0363d7ef660b.tar.gz
frost-87e7e132a060e235d434a9ef44ae0363d7ef660b.tar.bz2
frost-87e7e132a060e235d434a9ef44ae0363d7ef660b.zip
Add url formatter
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClientMenu.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClientMenu.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClientMenu.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClientMenu.kt
index 2a1a5b74..af13c459 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClientMenu.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClientMenu.kt
@@ -15,7 +15,7 @@ class FrostWebViewClientMenu(webCore: FrostWebViewCore) : FrostWebViewClient(web
var content: String? = null
val progressObservable: Subject<Int> = webCore.progressObservable
- private val contentBaseUrl = "https://touch.facebook.com/notifications"
+ private val contentBaseUrl = "${FB_URL_BASE}notifications"
override fun onPageStarted(view: WebView, url: String, favicon: Bitmap?) {
super.onPageStarted(view, url, favicon)
@@ -38,7 +38,10 @@ class FrostWebViewClientMenu(webCore: FrostWebViewCore) : FrostWebViewClient(web
jsInject(JsAssets.MENU, callback = {
jsInject(JsAssets.MENU_CLICK) //menu injection must be after or we will have a loop from the click listener
})
- } else if (url == contentBaseUrl) jsInject(JsAssets.MENU_CLICK)
+ } else if (url == contentBaseUrl) {
+ L.i("Inject content")
+ jsInject(JsAssets.MENU_CLICK)
+ }
}
override fun emit(flag: Int) {