[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] Bug 1862537 - Do not try to go back when it's a initial load...



Title: GitLab

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:

Changes:

  • android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineSession.kt
    ... ... @@ -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
     
    

  • android-components/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/GeckoEngineSessionTest.kt
    ... ... @@ -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>,
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits