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
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:
... | ... | @@ -869,9 +869,12 @@ class GeckoEngineSession( |
869 | 869 | return GeckoResult.fromValue(false)
|
870 | 870 | }
|
871 | 871 | |
872 | - appRedirectUrl?.let {
|
|
873 | - if (url == appRedirectUrl) {
|
|
874 | - return GeckoResult.fromValue(false)
|
|
872 | + // if it is an initial load then we can't go back. We should update the URL.
|
|
873 | + if (!initialLoad) {
|
|
874 | + appRedirectUrl?.let {
|
|
875 | + if (url == appRedirectUrl) {
|
|
876 | + return GeckoResult.fromValue(false)
|
|
877 | + }
|
|
875 | 878 | }
|
876 | 879 | }
|
877 | 880 |
... | ... | @@ -968,6 +968,7 @@ class GeckoEngineSessionTest { |
968 | 968 | )
|
969 | 969 | engineSession.settings.historyTrackingDelegate = historyTrackingDelegate
|
970 | 970 | engineSession.appRedirectUrl = emptyPageUrl
|
971 | + engineSession.initialLoad = false
|
|
971 | 972 | |
972 | 973 | class MockHistoryList(
|
973 | 974 | items: List<GeckoSession.HistoryDelegate.HistoryItem>,
|