From 72bc20ebd16add5b4c68d6aabe02c267932abd4d Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 1 Sep 2024 19:04:03 +0200 Subject: [PATCH] Hiding password on enter press --- .../net/codinux/banking/ui/forms/PasswordTextField.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/PasswordTextField.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/PasswordTextField.kt index b44974a..270e54d 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/PasswordTextField.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/PasswordTextField.kt @@ -41,6 +41,10 @@ fun PasswordTextField(password: String = "", label: String = "Passwort", onEnter ) }, keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password), - onEnterPressed = onEnterPressed + onEnterPressed = { + passwordVisible = false // actually only senseful for AddAccountDialog so that password isn't visible during (long) communication process with bank server + + onEnterPressed?.invoke() + } ) } \ No newline at end of file