fix: Empty password #2541

This commit is contained in:
J-Jamet committed 2026-05-30 10:58:50 +02:00
1 parent 698fdcb5ce
commit 78a6f1ab2e
2 files changed
+2 -3

No files matched your search

@@ -141,13 +141,13 @@ class MainCredentialView @JvmOverloads constructor(context: Context,
}
fun populatePasswordTextView(text: CharArray?) {
if (text == null || text.isEmpty()) {
if (text == null) {
passwordTextView.setText("")
if (checkboxPasswordView.isChecked)
checkboxPasswordView.isChecked = false
} else {
passwordTextView.setCharArray(text)
if (checkboxPasswordView.isChecked)
if (!checkboxPasswordView.isChecked)
checkboxPasswordView.isChecked = true
}
}
@@ -147,7 +147,6 @@ class PasswordEditView @JvmOverloads constructor(context: Context,
var passwordCharArray: CharArray?
get() {
if (passwordText.length() == 0) return null
val password = CharArray(passwordText.length())
passwordText.text.getChars(0, passwordText.length(), password, 0)
return password