ma1 pushed to branch tor-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser

Commits:

2 changed files:

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(
    1120 1120
                     return
    
    1121 1121
                 }
    
    1122 1122
     
    
    1123
    -            appRedirectUrl?.let {
    
    1124
    -                if (url == appRedirectUrl) {
    
    1125
    -                    goBack(false)
    
    1126
    -                    return
    
    1123
    +            // if it is an initial load then we can't go back. We should update the URL.
    
    1124
    +            if (!initialLoad) {
    
    1125
    +                appRedirectUrl?.let {
    
    1126
    +                    if (url == appRedirectUrl) {
    
    1127
    +                        goBack(false)
    
    1128
    +                        return
    
    1129
    +                    }
    
    1127 1130
                     }
    
    1128 1131
                 }
    
    1129 1132
     
    

  • mobile/android/android-components/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/GeckoEngineSessionTest.kt
    ... ... @@ -1049,6 +1049,7 @@ class GeckoEngineSessionTest {
    1049 1049
             )
    
    1050 1050
             engineSession.settings.historyTrackingDelegate = historyTrackingDelegate
    
    1051 1051
             engineSession.appRedirectUrl = emptyPageUrl
    
    1052
    +        engineSession.initialLoad = false
    
    1052 1053
     
    
    1053 1054
             class MockHistoryList(
    
    1054 1055
                 items: List<GeckoSession.HistoryDelegate.HistoryItem>,