mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-27 20:36:46 -08:00
fix: Empty password #2541
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user