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

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-128.6.0esr-14.5-1] [android] Bug_43351: Add function to disable forcing ALL CAPS for the fenix...



Title: GitLab

Pier Angelo Vendrame pushed to branch tor-browser-128.6.0esr-14.5-1 at The Tor Project / Applications / Tor Browser

Commits:

  • 9891ea34
    by clairehurst at 2025-01-14T18:24:40+00:00
    [android] Bug_43351: Add function to disable forcing ALL CAPS for the fenix snackbar action button text
    
    This is needed because the default snackbar will force all caps, which can cause problems in some languages. See tor-browser#43351 and bugzilla bug 1935387.
    
    TODO: Remove once the forced all caps is removed by mozilla.
    

2 changed files:

Changes:

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
    ... ... @@ -1121,6 +1121,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, TorIn
    1121 1121
                     isDisplayedWithBrowserToolbar = true,
    
    1122 1122
                 )
    
    1123 1123
                     .setText(getString(R.string.connection_assist_connect_to_tor_before_opening_links))
    
    1124
    +                .setAllCapsForActionButton(false)
    
    1124 1125
                     .setAction(getString(R.string.connection_assist_connect_to_tor_before_opening_links_confirmation)) {
    
    1125 1126
                         torConnectionAssistViewModel.handleConnect(searchTermOrURL)
    
    1126 1127
                         if (navHost.navController.previousBackStackEntry?.destination?.id == R.id.torConnectionAssistFragment) {
    

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/FenixSnackbar.kt
    ... ... @@ -100,6 +100,14 @@ class FenixSnackbar private constructor(
    100 100
             }
    
    101 101
         }
    
    102 102
     
    
    103
    +    /**
    
    104
    +     * @param textAllCaps Present the text in ALL CAPS. This may use a small-caps form when available.
    
    105
    +     * Overwrites the default value set in fenix_snackbar.xml
    
    106
    +     */
    
    107
    +    fun setAllCapsForActionButton(textAllCaps: Boolean) = this.apply {
    
    108
    +        binding.snackbarBtn.isAllCaps = textAllCaps
    
    109
    +    }
    
    110
    +
    
    103 111
         companion object {
    
    104 112
             const val LENGTH_LONG = Snackbar.LENGTH_LONG
    
    105 113
             const val LENGTH_SHORT = Snackbar.LENGTH_SHORT
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx