diff options
| author | David Göransson <david.goransson90@gmail.com> | 2023-09-19 10:20:39 +0200 |
|---|---|---|
| committer | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2023-09-27 13:44:48 +0200 |
| commit | d6adb5a9b05e8770a6accdea4879236d17fa439a (patch) | |
| tree | 406f12b35f74f627e27c1736f2331673723b7e10 /android | |
| parent | 9bec28519867652cffc4e67be19f20ba53ebfab6 (diff) | |
| download | mullvadvpn-d6adb5a9b05e8770a6accdea4879236d17fa439a.tar.xz mullvadvpn-d6adb5a9b05e8770a6accdea4879236d17fa439a.zip | |
Clarify obfuscation variable
Diffstat (limited to 'android')
2 files changed, 5 insertions, 5 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/AccountNumberView.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/AccountNumberView.kt index 689ff5dfd5..df0ae4d299 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/AccountNumberView.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/AccountNumberView.kt @@ -8,12 +8,12 @@ import net.mullvad.mullvadvpn.lib.common.util.groupWithSpaces @Composable fun AccountNumberView( accountNumber: String, - doObfuscateWithPasswordDots: Boolean, + obfuscateWithPasswordDots: Boolean, modifier: Modifier = Modifier ) { InformationView( content = - if (doObfuscateWithPasswordDots) accountNumber.groupPasswordModeWithSpaces() + if (obfuscateWithPasswordDots) accountNumber.groupPasswordModeWithSpaces() else accountNumber.groupWithSpaces(), modifier = modifier, whenMissing = MissingPolicy.SHOW_SPINNER diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/CopyableObfuscationView.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/CopyableObfuscationView.kt index ca3957ccb0..379f598573 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/CopyableObfuscationView.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/CopyableObfuscationView.kt @@ -29,7 +29,7 @@ private fun PreviewCopyableObfuscationView() { @Composable fun CopyableObfuscationView(content: String) { - var shouldObfuscated by remember { mutableStateOf(true) } + var obfuscationEnabled by remember { mutableStateOf(true) } Row( verticalAlignment = CenterVertically, @@ -37,7 +37,7 @@ fun CopyableObfuscationView(content: String) { ) { AccountNumberView( accountNumber = content, - doObfuscateWithPasswordDots = shouldObfuscated, + obfuscateWithPasswordDots = obfuscationEnabled, modifier = Modifier.weight(1f) ) AnimatedIconButton( @@ -45,7 +45,7 @@ fun CopyableObfuscationView(content: String) { secondaryIcon = painterResource(id = R.drawable.icon_show), isToggleButton = true, contentDescription = stringResource(id = R.string.hide_account_number), - onClick = { shouldObfuscated = !shouldObfuscated } + onClick = { obfuscationEnabled = !obfuscationEnabled } ) val context = LocalContext.current |
