Skip to content
Snippets Groups Projects
Commit c7d2cb7f authored by cypherpunks1's avatar cypherpunks1 Committed by morgan
Browse files

fixup! Bug 42195: [android] Fix "Whats new URL"

Bug 43228: Fix the What's new URL
parent cac6c9f2
Branches
Tags
1 merge request!1262Bug 43228: Fix the "What's new" URL and text on Android
Pipeline #216006 failed
......@@ -110,14 +110,10 @@ object SupportUtils {
}
fun getTorWhatsNewUrl(): String {
val fullVersionName: String = BuildConfig.VERSION_NAME // e.g. "115.2.1-beta (13.5a5)"
if (!fullVersionName.contains('(') || !fullVersionName.contains(')')) {
val versionNumber = BuildConfig.VERSION_NAME.substringBefore(' ') // e.g. "13.5a5"
if (versionNumber.isEmpty()) {
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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment