ma1 pushed to branch tor-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits: 13a575c8 by Roger Yang at 2024-09-16T22:28:43+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:
- mobile/android/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineSession.kt - mobile/android/android-components/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/GeckoEngineSessionTest.kt
Changes:
===================================== mobile/android/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineSession.kt ===================================== @@ -1120,10 +1120,13 @@ class GeckoEngineSession( return }
- appRedirectUrl?.let { - if (url == appRedirectUrl) { - goBack(false) - return + // if it is an initial load then we can't go back. We should update the URL. + if (!initialLoad) { + appRedirectUrl?.let { + if (url == appRedirectUrl) { + goBack(false) + return + } } }
===================================== mobile/android/android-components/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/GeckoEngineSessionTest.kt ===================================== @@ -1049,6 +1049,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/tor-browser/-/commit/13a575c8...
tbb-commits@lists.torproject.org