Commits:
5 changed files:
Changes:
fenix/app/src/main/java/org/mozilla/fenix/home/HomeMenuView.kt
... |
... |
@@ -170,7 +170,7 @@ class HomeMenuView( |
170
|
170
|
Events.whatsNewTapped.record(NoExtras())
|
171
|
171
|
|
172
|
172
|
homeActivity.openToBrowserAndLoad(
|
173
|
|
- searchTermOrURL = SupportUtils.WHATS_NEW_URL,
|
|
173
|
+ searchTermOrURL = SupportUtils.getTorWhatsNewUrl(),
|
174
|
174
|
newTab = true,
|
175
|
175
|
from = BrowserDirection.FromHome,
|
176
|
176
|
)
|
fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
... |
... |
@@ -38,7 +38,7 @@ object SupportUtils { |
38
|
38
|
const val MEITUAN_URL = "https://tb.j5k6.com/6ZSOp"
|
39
|
39
|
const val GOOGLE_US_URL = "https://www.google.com/webhp?client=firefox-b-1-m&channel=ts"
|
40
|
40
|
const val GOOGLE_XX_URL = "https://www.google.com/webhp?client=firefox-b-m&channel=ts"
|
41
|
|
- const val WHATS_NEW_URL = "https://www.torproject.org/releases/"
|
|
41
|
+// const val WHATS_NEW_URL = "https://www.torproject.org/releases/"
|
42
|
42
|
const val DONATE_URL = "https://donate.torproject.org/"
|
43
|
43
|
const val TB_MANUAL_URL = "https://tb-manual.torproject.org/mobile-tor"
|
44
|
44
|
|
... |
... |
@@ -100,6 +100,12 @@ object SupportUtils { |
100
|
100
|
return TB_MANUAL_URL
|
101
|
101
|
}
|
102
|
102
|
|
|
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}/"
|
|
107
|
+ }
|
|
108
|
+
|
103
|
109
|
fun getMozillaPageUrl(page: MozillaPage, locale: Locale = Locale.getDefault()): String {
|
104
|
110
|
val path = page.path
|
105
|
111
|
val langTag = getLanguageTag(locale)
|
fenix/app/src/main/java/org/mozilla/fenix/settings/about/AboutFragment.kt
... |
... |
@@ -135,7 +135,7 @@ class AboutFragment : Fragment(), AboutPageListener { |
135
|
135
|
AboutPageItem(
|
136
|
136
|
AboutItem.ExternalLink(
|
137
|
137
|
WHATS_NEW,
|
138
|
|
- SupportUtils.WHATS_NEW_URL,
|
|
138
|
+ SupportUtils.getTorWhatsNewUrl(),
|
139
|
139
|
),
|
140
|
140
|
getString(R.string.about_whats_new, getString(R.string.app_name)),
|
141
|
141
|
),
|
fenix/app/src/test/java/org/mozilla/fenix/home/HomeMenuViewTest.kt
... |
... |
@@ -207,7 +207,7 @@ class HomeMenuViewTest { |
207
|
207
|
WhatsNew.userViewedWhatsNew(testContext)
|
208
|
208
|
|
209
|
209
|
homeActivity.openToBrowserAndLoad(
|
210
|
|
- searchTermOrURL = SupportUtils.WHATS_NEW_URL,
|
|
210
|
+ searchTermOrURL = SupportUtils.getTorWhatsNewUrl(),
|
211
|
211
|
newTab = true,
|
212
|
212
|
from = BrowserDirection.FromHome,
|
213
|
213
|
)
|
fenix/app/src/test/java/org/mozilla/fenix/settings/SupportUtilsTest.kt
... |
... |
@@ -25,10 +25,10 @@ class SupportUtilsTest { |
25
|
25
|
"https://support.mozilla.org/1/mobile/20/Android/fr/tracking-protection-firefox-android",
|
26
|
26
|
SupportUtils.getSumoURLForTopic(mockContext("2 0"), SupportUtils.SumoTopic.TRACKING_PROTECTION, Locale("fr")),
|
27
|
27
|
)
|
28
|
|
- assertEquals(
|
29
|
|
- "https://www.mozilla.org/firefox/android/notes",
|
30
|
|
- SupportUtils.WHATS_NEW_URL,
|
31
|
|
- )
|
|
28
|
+// assertEquals(
|
|
29
|
+// "https://www.mozilla.org/firefox/android/notes",
|
|
30
|
+// SupportUtils.WHATS_NEW_URL,
|
|
31
|
+// )
|
32
|
32
|
}
|
33
|
33
|
|
34
|
34
|
@Test
|
... |
... |
@@ -63,7 +63,7 @@ class SupportUtilsTest { |
63
|
63
|
)
|
64
|
64
|
assertEquals(
|
65
|
65
|
"https://www.torproject.org/releases/",
|
66
|
|
- SupportUtils.WHATS_NEW_URL
|
|
66
|
+ SupportUtils.getTorWhatsNewUrl()
|
67
|
67
|
)
|
68
|
68
|
}
|
69
|
69
|
|
|