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
1 changed file:
Changes:
| ... | ... | @@ -101,9 +101,18 @@ object SupportUtils { | 
| 101 | 101 |      }
 | 
| 102 | 102 | |
| 103 | 103 |      fun getTorWhatsNewUrl(): String {
 | 
| 104 | -        val alpha = if (BuildConfig.VERSION_NAME.contains('a')) "alpha-" else ""
 | |
| 105 | -        val versionNumberNoDecimals = BuildConfig.VERSION_NAME.split('.').joinToString("")
 | |
| 106 | -        return "https://blog.torproject.org/new-${alpha}release-tor-browser-${versionNumberNoDecimals}/"
 | |
| 104 | +        val fullVersionName: String = BuildConfig.VERSION_NAME // e.g. "115.2.1-beta (13.5a5)"
 | |
| 105 | +        if (!fullVersionName.contains('(') || !fullVersionName.contains(')')) {
 | |
| 106 | +            return "https://blog.torproject.org/"
 | |
| 107 | +        }
 | |
| 108 | +        val versionNumber: String = fullVersionName.substring(
 | |
| 109 | +            fullVersionName.indexOf('(') + 1,
 | |
| 110 | +            fullVersionName.indexOf(')'),
 | |
| 111 | +        ) // e.g. "13.5a5"
 | |
| 112 | +        val alpha: String = if (versionNumber.contains('a')) "alpha-" else ""
 | |
| 113 | +        val versionNumberNoDecimals: String =
 | |
| 114 | +            versionNumber.split('.').joinToString("") // e.g. "135a5"
 | |
| 115 | +        return "https://blog.torproject.org/new-${alpha}release-tor-browser-${versionNumberNoDecimals}/" // e.g. "https://blog.torproject.org/new-alpha-release-tor-browser-135a5/
 | |
| 107 | 116 |      }
 | 
| 108 | 117 | |
| 109 | 118 |      fun getMozillaPageUrl(page: MozillaPage, locale: Locale = Locale.getDefault()): String {
 |