Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project
/ Applications / firefox-android
Commits:
6b497d60 by clairehurst at 2024-04-04T12:25:17-07:00
fixup! Bug 42195: Fix "Whats new URL"
Fix Whats New Url for dev/debug build
add to whats new url, remove autoformatting
- - - - -
1 changed file:
- fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
Changes:
=====================================
fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
=====================================
@@ -101,9 +101,18 @@ object SupportUtils {
}
fun getTorWhatsNewUrl(): String {
- val alpha = if (BuildConfig.VERSION_NAME.contains('a')) "alpha-" else
""
- val versionNumberNoDecimals =
BuildConfig.VERSION_NAME.split('.').joinToString("")
- return
"https://blog.torproject.org/new-${alpha}release-tor-browser-${versionNumberNoDecimals}/"
+ val fullVersionName: String = BuildConfig.VERSION_NAME // e.g.
"115.2.1-beta (13.5a5)"
+ if (!fullVersionName.contains('(') || !fullVersionName.contains(')')) {
+ return "https://blog.torproject.org/"
+ }
+ val versionNumber: String = fullVersionName.substring(
+ fullVersionName.indexOf('(') + 1,
+ fullVersionName.indexOf(')'),
+ ) // e.g. "13.5a5"
+ val alpha: String = if (versionNumber.contains('a')) "alpha-" else ""
+ val versionNumberNoDecimals: String =
+ versionNumber.split('.').joinToString("") // e.g. "135a5"
+ return
"https://blog.torproject.org/new-${alpha}release-tor-browser-${versionNumberNoDecimals}/"
// e.g. "https://blog.torproject.org/new-alpha-release-tor-browser-135a5/
}
fun getMozillaPageUrl(page: MozillaPage, locale: Locale =
Locale.getDefault()): String {
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/6b497d60f5f427a35bd85bc85b4e95bb3152e71f
--
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/6b497d60f5f427a35bd85bc85b4e95bb3152e71f
You're receiving this email because of your account on gitlab.torproject.org.
_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits