[tbb-commits] [Git][tpo/applications/tor-browser][tor-browser-128.2.0esr-14.0-1] Bug 1862537 - Do not try to go back when it's a initial load...
ma1 (@ma1)
git at gitlab.torproject.org
Mon Sep 16 20:29:40 UTC 2024
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/13a575c8e243aacd3dd3f6c4e5b17f3d55cb2773
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/13a575c8e243aacd3dd3f6c4e5b17f3d55cb2773
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20240916/5263d8d2/attachment-0001.htm>
More information about the tbb-commits
mailing list