Skip to content
Snippets Groups Projects
Commit 6b497d60 authored by clairehurst's avatar clairehurst Committed by Dan Ballard
Browse files

fixup! Bug 42195: Fix "Whats new URL"

Fix Whats New Url for dev/debug build
add to whats new url, remove autoformatting
parent dd7c3469
No related branches found
No related tags found
1 merge request!77Bug 42195: Fix "Whats new URL"
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment