diff options
| author | David Göransson <david.goransson@mullvad.net> | 2024-04-03 10:56:15 +0200 |
|---|---|---|
| committer | David Göransson <david.goransson@mullvad.net> | 2024-04-09 11:22:21 +0200 |
| commit | 06abfdfc7e677275c855ca9f35a70375febe25b2 (patch) | |
| tree | eafbced8589185ec9e1b0ace1877df80438354a5 /android/app | |
| parent | 77d24c0ac3ec1f75c57b1b208d7e01654c018e81 (diff) | |
| download | mullvadvpn-06abfdfc7e677275c855ca9f35a70375febe25b2.tar.xz mullvadvpn-06abfdfc7e677275c855ca9f35a70375febe25b2.zip | |
Update Split tunneling description
Diffstat (limited to 'android/app')
2 files changed, 10 insertions, 10 deletions
diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/SplitTunnelingScreenTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/SplitTunnelingScreenTest.kt index 89f1a58f7a..04b88ce3b5 100644 --- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/SplitTunnelingScreenTest.kt +++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/SplitTunnelingScreenTest.kt @@ -40,7 +40,7 @@ class SplitTunnelingScreenTest { // Assert onNodeWithText(TITLE).assertExists() - onNodeWithText(DESCRIPTION).assertExists() + onNodeWithText(DESCRIPTION, substring = true).assertExists() onNodeWithText(EXCLUDED_APPLICATIONS).assertDoesNotExist() onNodeWithText(SHOW_SYSTEM_APPS).assertDoesNotExist() onNodeWithText(ALL_APPLICATIONS).assertDoesNotExist() @@ -76,7 +76,7 @@ class SplitTunnelingScreenTest { // Assert onNodeWithText(TITLE).assertExists() - onNodeWithText(DESCRIPTION).assertExists() + onNodeWithText(DESCRIPTION, substring = true).assertExists() onNodeWithText(EXCLUDED_APPLICATIONS).assertExists() onNodeWithText(EXCLUDED_APP_NAME).assertExists() onNodeWithText(SHOW_SYSTEM_APPS).assertExists() @@ -108,7 +108,7 @@ class SplitTunnelingScreenTest { // Assert onNodeWithText(TITLE).assertExists() - onNodeWithText(DESCRIPTION).assertExists() + onNodeWithText(DESCRIPTION, substring = true).assertExists() onNodeWithText(EXCLUDED_APPLICATIONS).assertDoesNotExist() onNodeWithText(EXCLUDED_APP_NAME).assertDoesNotExist() onNodeWithText(SHOW_SYSTEM_APPS).assertExists() @@ -233,7 +233,8 @@ class SplitTunnelingScreenTest { private const val INCLUDED_APP_PACKAGE_NAME = "included-pkg" private const val INCLUDED_APP_NAME = "Included Name" private const val TITLE = "Split tunneling" - private const val DESCRIPTION = "Choose the apps you want to exclude from the VPN tunnel." + private const val DESCRIPTION = + "Lets you select apps that should access the Internet directly without going through the VPN tunnel." private const val EXCLUDED_APPLICATIONS = "Excluded applications" private const val SHOW_SYSTEM_APPS = "Show system apps" private const val ALL_APPLICATIONS = "All applications" diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SplitTunnelingScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SplitTunnelingScreen.kt index 29aca2b3b4..c355eb6405 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SplitTunnelingScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SplitTunnelingScreen.kt @@ -126,8 +126,8 @@ fun SplitTunnelingScreen( horizontalAlignment = Alignment.CenterHorizontally, state = lazyListState ) { + description() enabledToggle(enabled = state.enabled, onEnableSplitTunneling = onEnableSplitTunneling) - description(enabled = state.enabled) spacer() when (state) { is SplitTunnelingUiState.Loading -> { @@ -161,14 +161,13 @@ private fun LazyListScope.enabledToggle( } } -private fun LazyListScope.description(enabled: Boolean) { +private fun LazyListScope.description() { item(key = CommonContentKey.DESCRIPTION, contentType = ContentType.DESCRIPTION) { SwitchComposeSubtitleCell( text = - if (enabled) { - stringResource(id = R.string.split_tunneling_description) - } else { - stringResource(id = R.string.split_tunneling_disabled_description) + buildString { + appendLine(stringResource(id = R.string.split_tunneling_description)) + append(stringResource(id = R.string.split_tunneling_description_warning)) } ) } |
