morgan pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android
Commits: 070534b9 by hackademix at 2024-09-16T21:37:26+02:00 Bug 1862537 - Do not try to go back when it's a initial load r=android-reviewers,harrisono, a=pascalc
Differential Revision: https://phabricator.services.mozilla.com/D219782
- - - - -
2 changed files:
- android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineSession.kt - android-components/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/GeckoEngineSessionTest.kt
Changes:
===================================== android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineSession.kt ===================================== @@ -869,9 +869,12 @@ class GeckoEngineSession( return GeckoResult.fromValue(false) }
- appRedirectUrl?.let { - if (url == appRedirectUrl) { - return GeckoResult.fromValue(false) + // if it is an initial load then we can't go back. We should update the URL. + if (!initialLoad) { + appRedirectUrl?.let { + if (url == appRedirectUrl) { + return GeckoResult.fromValue(false) + } } }
===================================== android-components/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/GeckoEngineSessionTest.kt ===================================== @@ -968,6 +968,7 @@ class GeckoEngineSessionTest { ) engineSession.settings.historyTrackingDelegate = historyTrackingDelegate engineSession.appRedirectUrl = emptyPageUrl + engineSession.initialLoad = false
class MockHistoryList( items: List<GeckoSession.HistoryDelegate.HistoryItem>,
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/0705...