From ba458a612610512e28b65bafcf74177ddc77bbbe Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 21 Nov 2021 23:56:20 -0800 Subject: Improve menu loading when going back --- .../com/pitchedapps/frost/fragments/WebFragments.kt | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/fragments') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragments.kt b/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragments.kt index 3cac92af..29473461 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragments.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragments.kt @@ -61,20 +61,4 @@ class WebFragment : BaseFragment() { } super.updateFab(contract) } - - override fun onBackPressed(): Boolean { - if (baseEnum == FbItem.MENU) { - val core = core - val web = core as? WebView - if (web != null && web.canGoBack() && !web.canGoBackOrForward(-2)) { - // If menu item + we are at the second last entry, reload the base - // To properly inflate the menu - // Related to https://github.com/AllanWang/Frost-for-Facebook/issues/1593 - core.clearHistory() - core.reloadBase(true) - return true - } - } - return super.onBackPressed() - } } -- cgit v1.2.3