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:
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
-
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/FenixSnackbar.kt
Changes:
=====================================
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
=====================================
@@ -1121,6 +1121,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(),
NavHostActivity, TorIn
isDisplayedWithBrowserToolbar = true,
)
.setText(getString(R.string.connection_assist_connect_to_tor_before_opening_links))
+ .setAllCapsForActionButton(false)
.setAction(getString(R.string.connection_assist_connect_to_tor_before_opening_links_confirmation))
{
torConnectionAssistViewModel.handleConnect(searchTermOrURL)
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(
}
}
+ /**
+ * @param textAllCaps Present the text in ALL CAPS. This may use a
small-caps form when available.
+ * Overwrites the default value set in fenix_snackbar.xml
+ */
+ fun setAllCapsForActionButton(textAllCaps: Boolean) = this.apply {
+ binding.snackbarBtn.isAllCaps = textAllCaps
+ }
+
companion object {
const val LENGTH_LONG = Snackbar.LENGTH_LONG
const val LENGTH_SHORT = Snackbar.LENGTH_SHORT
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/9891ea34543f6f0dbed4da651e0d9f215f9bfb13
--
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/9891ea34543f6f0dbed4da651e0d9f215f9bfb13
You're receiving this email because of your account on gitlab.torproject.org.
_______________________________________________
tbb-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]