From b2718d238a12fa5b425b01cf2f47adf12e9a2c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20G=C3=B6ransson?= Date: Tue, 19 Sep 2023 10:20:39 +0200 Subject: [PATCH] Clarify obfuscation variable --- .../mullvadvpn/compose/component/AccountNumberView.kt | 4 ++-- .../mullvadvpn/compose/component/CopyableObfuscationView.kt | 6 +++--- 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 689ff5dfd552..df0ae4d299b9 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 ca3957ccb025..379f59857385 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