Skip to content

Commit 6726c56

Browse files
committed
Remove see full changelog button
1 parent f9c44d6 commit 6726c56

File tree

26 files changed

+4
-94
lines changed

26 files changed

+4
-94
lines changed

android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ChangelogScreenTest.kt

+2-12
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,8 @@ class ChangelogScreenTest {
2424
MockKAnnotations.init(this)
2525
}
2626

27-
private fun ComposeContext.initScreen(
28-
state: ChangelogUiState,
29-
onSeeFullChangelog: () -> Unit = {},
30-
onBackClick: () -> Unit = {},
31-
) {
32-
setContentWithTheme {
33-
ChangelogScreen(
34-
state = state,
35-
onSeeFullChangelog = onSeeFullChangelog,
36-
onBackClick = onBackClick,
37-
)
38-
}
27+
private fun ComposeContext.initScreen(state: ChangelogUiState, onBackClick: () -> Unit = {}) {
28+
setContentWithTheme { ChangelogScreen(state = state, onBackClick = onBackClick) }
3929
}
4030

4131
@Test

android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/extensions/UriHandlerExtensions.kt

-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ fun UriHandler.createOpenAccountPageHook(): (WebsiteAuthToken?) -> Unit {
1717
}
1818
}
1919

20-
@Composable
21-
fun UriHandler.createOpenFullChangeLogHook(): () -> Unit {
22-
val changelogUrl = stringResource(id = R.string.changelog_url)
23-
return { safeOpenUri(changelogUrl) }
24-
}
25-
2620
fun UriHandler.createUriHook(uri: String): () -> Unit = { safeOpenUri(uri) }
2721

2822
private fun UriHandler.safeOpenUri(uri: String) {

android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ChangelogScreen.kt

+2-41
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
package net.mullvad.mullvadvpn.compose.screen
22

33
import androidx.compose.foundation.layout.Arrangement
4-
import androidx.compose.foundation.layout.Box
54
import androidx.compose.foundation.layout.Column
65
import androidx.compose.foundation.layout.Row
76
import androidx.compose.foundation.layout.fillMaxWidth
87
import androidx.compose.foundation.layout.padding
98
import androidx.compose.foundation.layout.width
109
import androidx.compose.foundation.rememberScrollState
1110
import androidx.compose.foundation.verticalScroll
12-
import androidx.compose.material.icons.Icons
13-
import androidx.compose.material.icons.automirrored.filled.OpenInNew
14-
import androidx.compose.material3.Icon
1511
import androidx.compose.material3.MaterialTheme
1612
import androidx.compose.material3.Text
1713
import androidx.compose.runtime.Composable
1814
import androidx.compose.runtime.LaunchedEffect
1915
import androidx.compose.ui.Modifier
20-
import androidx.compose.ui.platform.LocalUriHandler
2116
import androidx.compose.ui.res.stringResource
2217
import androidx.compose.ui.text.style.TextAlign
2318
import androidx.compose.ui.tooling.preview.Preview
@@ -26,18 +21,14 @@ import androidx.navigation.NavController
2621
import com.ramcosta.composedestinations.annotation.Destination
2722
import com.ramcosta.composedestinations.annotation.RootGraph
2823
import net.mullvad.mullvadvpn.R
29-
import net.mullvad.mullvadvpn.compose.button.PrimaryButton
3024
import net.mullvad.mullvadvpn.compose.component.NavigateBackIconButton
3125
import net.mullvad.mullvadvpn.compose.component.NavigateCloseIconButton
3226
import net.mullvad.mullvadvpn.compose.component.ScaffoldWithMediumTopBar
3327
import net.mullvad.mullvadvpn.compose.component.drawVerticalScrollbar
34-
import net.mullvad.mullvadvpn.compose.extensions.createOpenFullChangeLogHook
3528
import net.mullvad.mullvadvpn.compose.transitions.SlideInFromRightTransition
36-
import net.mullvad.mullvadvpn.compose.util.CollectSideEffectWithLifecycle
3729
import net.mullvad.mullvadvpn.lib.theme.AppTheme
3830
import net.mullvad.mullvadvpn.lib.theme.Dimens
3931
import net.mullvad.mullvadvpn.lib.theme.color.AlphaScrollbar
40-
import net.mullvad.mullvadvpn.viewmodel.ChangeLogSideEffect
4132
import net.mullvad.mullvadvpn.viewmodel.ChangelogUiState
4233
import net.mullvad.mullvadvpn.viewmodel.ChangelogViewModel
4334
import org.koin.androidx.compose.koinViewModel
@@ -52,29 +43,15 @@ fun Changelog(navController: NavController) {
5243

5344
val uiState = viewModel.uiState.collectAsStateWithLifecycle()
5445

55-
val openAccountPage = LocalUriHandler.current.createOpenFullChangeLogHook()
56-
CollectSideEffectWithLifecycle(viewModel.uiSideEffect) {
57-
when (it) {
58-
is ChangeLogSideEffect.OpenFullChangelog -> openAccountPage()
59-
}
60-
}
6146
LaunchedEffect(Unit) { viewModel.dismissChangelogNotification() }
6247

63-
ChangelogScreen(
64-
uiState.value,
65-
onBackClick = navController::navigateUp,
66-
onSeeFullChangelog = viewModel::onSeeFullChangelog,
67-
)
48+
ChangelogScreen(uiState.value, onBackClick = navController::navigateUp)
6849
}
6950

7051
data class ChangelogNavArgs(val isModal: Boolean = false)
7152

7253
@Composable
73-
fun ChangelogScreen(
74-
state: ChangelogUiState,
75-
onBackClick: () -> Unit,
76-
onSeeFullChangelog: () -> Unit,
77-
) {
54+
fun ChangelogScreen(state: ChangelogUiState, onBackClick: () -> Unit) {
7855

7956
ScaffoldWithMediumTopBar(
8057
appBarTitle = stringResource(id = R.string.changelog_title),
@@ -114,19 +91,6 @@ fun ChangelogScreen(
11491
state.changes.forEach { changeItem -> ChangeListItem(text = changeItem) }
11592
}
11693
}
117-
Box(modifier = Modifier.padding(Dimens.mediumPadding).fillMaxWidth()) {
118-
PrimaryButton(
119-
onClick = onSeeFullChangelog,
120-
text = stringResource(R.string.see_full_changelog),
121-
trailingIcon = {
122-
Icon(
123-
imageVector = Icons.AutoMirrored.Default.OpenInNew,
124-
contentDescription = null,
125-
tint = MaterialTheme.colorScheme.onSurface,
126-
)
127-
},
128-
)
129-
}
13094
}
13195
}
13296
}
@@ -158,7 +122,6 @@ private fun PreviewChangelogDialogWithSingleShortItem() {
158122
ChangelogScreen(
159123
ChangelogUiState(changes = listOf("Item 1"), version = "1111.1"),
160124
onBackClick = {},
161-
onSeeFullChangelog = {},
162125
)
163126
}
164127
}
@@ -178,7 +141,6 @@ private fun PreviewChangelogDialogWithTwoLongItems() {
178141
version = "1111.1",
179142
),
180143
onBackClick = {},
181-
onSeeFullChangelog = {},
182144
)
183145
}
184146
}
@@ -205,7 +167,6 @@ private fun PreviewChangelogDialogWithTenShortItems() {
205167
version = "1111.1",
206168
),
207169
onBackClick = {},
208-
onSeeFullChangelog = {},
209170
)
210171
}
211172
}

android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/ChangelogViewModel.kt

-11
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ import androidx.lifecycle.SavedStateHandle
55
import androidx.lifecycle.ViewModel
66
import androidx.lifecycle.viewModelScope
77
import com.ramcosta.composedestinations.generated.destinations.ChangelogDestination
8-
import kotlinx.coroutines.channels.Channel
98
import kotlinx.coroutines.flow.MutableStateFlow
109
import kotlinx.coroutines.flow.StateFlow
11-
import kotlinx.coroutines.flow.receiveAsFlow
1210
import kotlinx.coroutines.launch
1311
import kotlinx.parcelize.Parcelize
1412
import net.mullvad.mullvadvpn.lib.model.BuildVersion
@@ -20,8 +18,6 @@ class ChangelogViewModel(
2018
buildVersion: BuildVersion,
2119
) : ViewModel() {
2220
private val navArgs = ChangelogDestination.argsFrom(savedStateHandle)
23-
private val _uiSideEffect = Channel<ChangeLogSideEffect>()
24-
val uiSideEffect = _uiSideEffect.receiveAsFlow()
2521

2622
val uiState: StateFlow<ChangelogUiState> =
2723
MutableStateFlow(
@@ -34,13 +30,6 @@ class ChangelogViewModel(
3430

3531
fun dismissChangelogNotification() =
3632
viewModelScope.launch { changelogRepository.setDismissNewChangelogNotification() }
37-
38-
fun onSeeFullChangelog() =
39-
viewModelScope.launch { _uiSideEffect.send(ChangeLogSideEffect.OpenFullChangelog) }
40-
}
41-
42-
sealed interface ChangeLogSideEffect {
43-
object OpenFullChangelog : ChangeLogSideEffect
4433
}
4534

4635
@Parcelize

android/lib/resource/src/main/res/values-da/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">Intet resultat for \"%1$s\". Prøv en anden søgning</string>
303303
<string name="search_placeholder">Søg efter...</string>
304304
<string name="search_query_empty">Indtast mindst 2 tegn for at starte søgningen.</string>
305-
<string name="see_full_changelog">Se hele ændringsloggen</string>
306305
<string name="select_location">Vælg placering</string>
307306
<string name="send">Send</string>
308307
<string name="send_anyway">Send alligevel</string>

android/lib/resource/src/main/res/values-de/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">Kein Ergebnis für „%1$s“, bitte versuchen Sie einen anderen Suchbegriff</string>
303303
<string name="search_placeholder">Suchen nach …</string>
304304
<string name="search_query_empty">Geben Sie mindestens 2 Zeichen ein, um die Suche zu starten.</string>
305-
<string name="see_full_changelog">Komplettes Changelog anzeigen</string>
306305
<string name="select_location">Ort auswählen</string>
307306
<string name="send">Senden</string>
308307
<string name="send_anyway">Trotzdem senden</string>

android/lib/resource/src/main/res/values-es/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">No hay resultados para «%1$s», intente una búsqueda diferente</string>
303303
<string name="search_placeholder">Buscar...</string>
304304
<string name="search_query_empty">Escriba al menos 2 caracteres para iniciar la búsqueda.</string>
305-
<string name="see_full_changelog">Vea el registro de cambios completo</string>
306305
<string name="select_location">Seleccionar ubicación</string>
307306
<string name="send">Enviar</string>
308307
<string name="send_anyway">Enviar de todos modos</string>

android/lib/resource/src/main/res/values-fi/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">Haulle \"%1$s\" ei löytynyt tuloksia. Kokeile toista hakua.</string>
303303
<string name="search_placeholder">Hae...</string>
304304
<string name="search_query_empty">Aloita haku kirjoittamalla vähintään 2 merkkiä.</string>
305-
<string name="see_full_changelog">Avaa koko muutosloki</string>
306305
<string name="select_location">Valitse sijainti</string>
307306
<string name="send">Lähetä</string>
308307
<string name="send_anyway">Lähetä silti</string>

android/lib/resource/src/main/res/values-fr/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">Aucun résultat pour « %1$s ». Veuillez essayer une autre recherche</string>
303303
<string name="search_placeholder">Rechercher...</string>
304304
<string name="search_query_empty">Saisissez au moins 2 caractères pour commencer la recherche.</string>
305-
<string name="see_full_changelog">Voir le journal des modifications complet</string>
306305
<string name="select_location">Sélectionner une localisation</string>
307306
<string name="send">Envoyer</string>
308307
<string name="send_anyway">Envoyer quand même</string>

android/lib/resource/src/main/res/values-it/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">Nessun risultato per \"%1$s\", prova una ricerca diversa</string>
303303
<string name="search_placeholder">Cerca...</string>
304304
<string name="search_query_empty">Digita almeno 2 caratteri per iniziare la ricerca.</string>
305-
<string name="see_full_changelog">Vedi changelog completo</string>
306305
<string name="select_location">Seleziona posizione</string>
307306
<string name="send">Invia</string>
308307
<string name="send_anyway">Invia comunque</string>

android/lib/resource/src/main/res/values-ja/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">「%1$s」の結果はありません。別の検索をお試しください。</string>
303303
<string name="search_placeholder">検索...</string>
304304
<string name="search_query_empty">検索を開始するには2文字以上を入力してください。</string>
305-
<string name="see_full_changelog">すべての変更履歴を見る</string>
306305
<string name="select_location">場所を選択する</string>
307306
<string name="send">送信</string>
308307
<string name="send_anyway">とにかく送信する</string>

android/lib/resource/src/main/res/values-ko/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">\"%1$s\" 검색 결과가 없습니다. 다른 검색어를 시도하세요</string>
303303
<string name="search_placeholder">검색...</string>
304304
<string name="search_query_empty">검색을 시작하려면 2자 이상 입력하세요.</string>
305-
<string name="see_full_changelog">전체 변경 로그 확인</string>
306305
<string name="select_location">위치 선택</string>
307306
<string name="send">전송</string>
308307
<string name="send_anyway">그래도 전송</string>

android/lib/resource/src/main/res/values-my/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">\"%1$s\" အတွက် ရလဒ်မရှိပါ၊ အခြားရှာဖွေမှုတစ်ခုကို စမ်းလုပ်ကြည့်ပါ</string>
303303
<string name="search_placeholder">ရှာရန်...</string>
304304
<string name="search_query_empty">စတင်ရှာဖွေရန် အနည်းဆုံး အက္ခရာ 2 လုံး ရိုက်ထည့်ပါ။</string>
305-
<string name="see_full_changelog">ပြောင်းလဲမှုမှတ်တမ်း အပြည့်အစုံကို ကြည့်ရန်</string>
306305
<string name="select_location">တည်နေရာ ရွေးရန်</string>
307306
<string name="send">ပို့ရန်</string>
308307
<string name="send_anyway">မည်သို့ပင်ဖြစ်စေ ပို့ရန်</string>

android/lib/resource/src/main/res/values-nb/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">Ingen resultater for «%1$s». Prøv et annet søk</string>
303303
<string name="search_placeholder">Søk etter ...</string>
304304
<string name="search_query_empty">Skriv minst 2 tegn for å begynne å søke.</string>
305-
<string name="see_full_changelog">Se komplett endringslogg</string>
306305
<string name="select_location">Velg plassering</string>
307306
<string name="send">Send</string>
308307
<string name="send_anyway">Send allikevel</string>

android/lib/resource/src/main/res/values-nl/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">Geen resultaat voor \"%1$s\", probeer een andere zoekopdracht</string>
303303
<string name="search_placeholder">Zoeken naar...</string>
304304
<string name="search_query_empty">Voer minimaal 2 tekens in om te beginnen met zoeken.</string>
305-
<string name="see_full_changelog">Volledige changelog weergeven</string>
306305
<string name="select_location">Locatie selecteren</string>
307306
<string name="send">Verzenden</string>
308307
<string name="send_anyway">Toch verzenden</string>

android/lib/resource/src/main/res/values-pl/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">Brak wyników dla hasła „%1$s”, spróbuj innego wyszukiwania</string>
303303
<string name="search_placeholder">Wyszukaj...</string>
304304
<string name="search_query_empty">Wpisz co najmniej 2 znaki, aby rozpocząć wyszukiwanie.</string>
305-
<string name="see_full_changelog">Zobacz pełny dziennik zmian</string>
306305
<string name="select_location">Wybierz lokalizację</string>
307306
<string name="send">Wyślij</string>
308307
<string name="send_anyway">Mimo to wyślij</string>

android/lib/resource/src/main/res/values-pt/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">Nenhum resultado para \"%1$s\", tente uma pesquisa diferente</string>
303303
<string name="search_placeholder">Pesquisar por...</string>
304304
<string name="search_query_empty">Digite pelo menos 2 caracteres para iniciar a pesquisa.</string>
305-
<string name="see_full_changelog">Ver registo de alterações completo</string>
306305
<string name="select_location">Selecionar localização</string>
307306
<string name="send">Enviar</string>
308307
<string name="send_anyway">Enviar mesmo assim</string>

android/lib/resource/src/main/res/values-ru/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">По запросу «%1$s» ничего не найдено — попробуйте другой запрос</string>
303303
<string name="search_placeholder">Поиск...</string>
304304
<string name="search_query_empty">Чтобы начать поиск, введите не менее двух символов.</string>
305-
<string name="see_full_changelog">Полная история изменений</string>
306305
<string name="select_location">Выбор местоположения</string>
307306
<string name="send">Отправить</string>
308307
<string name="send_anyway">Все равно отправить</string>

android/lib/resource/src/main/res/values-sv/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">Inga resultat hittades för \"%1$s\", försök med en annan sökning</string>
303303
<string name="search_placeholder">Sök efter …</string>
304304
<string name="search_query_empty">Ange minst två tecken för att börja söka.</string>
305-
<string name="see_full_changelog">Visa hela ändringsloggen</string>
306305
<string name="select_location">Välj plats</string>
307306
<string name="send">Skicka</string>
308307
<string name="send_anyway">Skicka ändå</string>

android/lib/resource/src/main/res/values-th/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">ไม่พบผลลัพธ์สำหรับ \"%1$s\" โปรดลองใช้คำค้นหาอื่น</string>
303303
<string name="search_placeholder">ค้นหา…</string>
304304
<string name="search_query_empty">พิมพ์อย่างน้อย 2 ตัวอักษร เพื่อเริ่มการค้นหา</string>
305-
<string name="see_full_changelog">ดูบันทึกการเปลี่ยนแปลงทั้งหมด</string>
306305
<string name="select_location">เลือกตำแหน่งที่ตั้ง</string>
307306
<string name="send">ส่ง</string>
308307
<string name="send_anyway">ส่งต่อไป</string>

android/lib/resource/src/main/res/values-tr/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">\"%1$s\" için sonuç yok, lütfen farklı bir arama yapın</string>
303303
<string name="search_placeholder">Ara...</string>
304304
<string name="search_query_empty">Arama yapmak için en az 2 karakter girin.</string>
305-
<string name="see_full_changelog">Değişiklik günlüğünün tamamını göster</string>
306305
<string name="select_location">Konum seçin</string>
307306
<string name="send">Gönder</string>
308307
<string name="send_anyway">Yine de gönder</string>

android/lib/resource/src/main/res/values-zh-rCN/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">“%1$s”无结果,请尝试其他搜索</string>
303303
<string name="search_placeholder">搜索…</string>
304304
<string name="search_query_empty">至少输入 2 个字符以开始搜索。</string>
305-
<string name="see_full_changelog">查看完整的更新日志</string>
306305
<string name="select_location">选择位置</string>
307306
<string name="send">发送</string>
308307
<string name="send_anyway">仍然发送</string>

android/lib/resource/src/main/res/values-zh-rTW/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<string name="search_location_empty_text">找不到「%1$s」的結果,請使改用其他搜尋條件。</string>
303303
<string name="search_placeholder">搜尋…</string>
304304
<string name="search_query_empty">至少輸入 2 個字元以開始搜尋。</string>
305-
<string name="see_full_changelog">查看完整變更日誌</string>
306305
<string name="select_location">選擇位置</string>
307306
<string name="send">傳送</string>
308307
<string name="send_anyway">仍要傳送</string>

android/lib/resource/src/main/res/values/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,6 @@
406406
<string name="open_feature_settings">Open %1$s settings</string>
407407
<string name="search">Search</string>
408408
<string name="obfuscation_info_shadowsocks_batteryusage">Attention: Shadowsocks can increase battery consumption depending on data usage, such as streaming a video.</string>
409-
<string name="see_full_changelog">See full changelog</string>
410409
<string name="changelog_empty">No changelog was added for this version</string>
411410
<string name="wg_port_subtitle">Set %s obfuscation to \"Automatic\" or \"Off\" below to activate this setting.</string>
412411
<string name="device_ip_version_title">Device IP version</string>

android/lib/resource/src/main/res/values/strings_non_translatable.xml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<string name="market_uri" translatable="false">market://details?id=%s</string>
77
<string name="faqs_and_guides_url" translatable="false">https://mullvad.net/help/tag/mullvad-app/</string>
88
<string name="privacy_policy_url" translatable="false">https://mullvad.net/help/privacy-policy/</string>
9-
<string name="changelog_url" translatable="false">https://github.com/mullvad/mullvadvpn-app/blob/main/android/CHANGELOG.md</string>
109
<string name="lockdown_url" translatable="false">https://mullvad.net/l/android-lockdown</string>
1110
<string name="split_tunneling" translatable="false">Split tunneling</string>
1211
<string name="wireguard" translatable="false">WireGuard</string>

desktop/packages/mullvad-vpn/locales/messages.pot

-3
Original file line numberDiff line numberDiff line change
@@ -2722,9 +2722,6 @@ msgstr ""
27222722
msgid "Search"
27232723
msgstr ""
27242724

2725-
msgid "See full changelog"
2726-
msgstr ""
2727-
27282725
msgid "Set %s obfuscation to \"Automatic\" or \"Off\" below to activate this setting."
27292726
msgstr ""
27302727

0 commit comments

Comments
 (0)