diff options
| author | saber safavi <saber.safavi@codic.se> | 2023-07-18 17:03:31 +0200 |
|---|---|---|
| committer | saber safavi <saber.safavi@codic.se> | 2023-07-19 15:52:19 +0200 |
| commit | ba0569778b42f7a9301d3ed4374b1cd5b3534dbf (patch) | |
| tree | 6d4b1e8505e2625d8124fdbaf17e09e4b6eb5656 /android | |
| parent | e3aed94155e8982822c8e419c7d218d7e7c8b1de (diff) | |
| download | mullvadvpn-ba0569778b42f7a9301d3ed4374b1cd5b3534dbf.tar.xz mullvadvpn-ba0569778b42f7a9301d3ed4374b1cd5b3534dbf.zip | |
Remove download link from settings in google play builds
Diffstat (limited to 'android')
| -rw-r--r-- | android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt | 4 | ||||
| -rw-r--r-- | android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SettingsScreen.kt | 20 |
2 files changed, 18 insertions, 6 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt index 3edab0bb77..3bb06a35b3 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt @@ -60,6 +60,7 @@ fun NavigationComposeCell( modifier: Modifier = Modifier, showWarning: Boolean = false, bodyView: @Composable () -> Unit = { DefaultNavigationView(chevronContentDescription = title) }, + isRowEnabled: Boolean = true, onClick: () -> Unit ) { BaseCell( @@ -67,7 +68,8 @@ fun NavigationComposeCell( title = { NavigationTitleView(title = title, modifier = modifier, showWarning = showWarning) }, - bodyView = { bodyView() } + bodyView = { bodyView() }, + isRowEnabled = isRowEnabled ) } diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SettingsScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SettingsScreen.kt index 54f3223360..d0b460633b 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SettingsScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SettingsScreen.kt @@ -127,13 +127,23 @@ fun SettingsScreen( }, bodyView = @Composable { - NavigationCellBody( - content = uiState.appVersion, - contentBodyDescription = stringResource(id = R.string.app_version), - isExternalLink = true, - ) + if (BuildConfig.BUILD_TYPE != BuildTypes.RELEASE) { + NavigationCellBody( + content = uiState.appVersion, + contentBodyDescription = + stringResource(id = R.string.app_version), + isExternalLink = true, + ) + } else { + Text( + text = uiState.appVersion, + style = MaterialTheme.typography.labelMedium, + color = MaterialTheme.colorScheme.onSecondary + ) + } }, showWarning = uiState.isUpdateAvailable, + isRowEnabled = BuildConfig.BUILD_TYPE != BuildTypes.RELEASE ) } if (uiState.isUpdateAvailable) { |
