aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
index 3e906a23..ad7f7858 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
@@ -302,7 +302,7 @@ class FrostWebViewClientMenu(web: FrostWebView) : FrostWebViewClient(web) {
* Instead, we remove the flyout margins within the js script so that it covers the header.
*/
override val facebookJsInjectors: List<InjectorContract> =
- super.facebookJsInjectors - CssHider.HEADER
+ super.facebookJsInjectors - CssHider.HEADER + CssAsset.Menu
override fun emit(flag: Int) {
super.emit(flag)
@@ -313,6 +313,17 @@ class FrostWebViewClientMenu(web: FrostWebView) : FrostWebViewClient(web) {
}
}
+ /*
+ * Facebook doesn't properly load back to the menu even in standard browsers.
+ * Instead, if we detect the base soft url, we will manually click the menu item
+ */
+ override fun doUpdateVisitedHistory(view: WebView, url: String?, isReload: Boolean) {
+ super.doUpdateVisitedHistory(view, url, isReload)
+ if (url?.startsWith(FbItem.MENU.url) == true) {
+ jsInject(JsAssets.MENU_QUICK, prefs = prefs)
+ }
+ }
+
override fun onPageFinishedActions(url: String) {
// Skip
}