Passphrase does not match (Export room keys) (Fixes #644)

This commit is contained in:
Benoit Marty 2019-10-29 14:38:04 +01:00
parent 7272343e6d
commit 361427488f
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ Other changes:
- -
Bugfix 🐛: Bugfix 🐛:
- - Passphrase does not match (Export room keys) (#644)
Translations 🗣: Translations 🗣:
- -

View File

@ -44,15 +44,15 @@ class ExportKeysDialog {
val textWatcher = object : SimpleTextWatcher() { val textWatcher = object : SimpleTextWatcher() {
override fun afterTextChanged(s: Editable) { override fun afterTextChanged(s: Editable) {
when { when {
passPhrase1EditText.text.isNullOrEmpty() -> { passPhrase1EditText.text.isNullOrEmpty() -> {
exportButton.isEnabled = false exportButton.isEnabled = false
passPhrase2Til.error = null passPhrase2Til.error = null
} }
passPhrase1EditText.text == passPhrase2EditText.text -> { passPhrase1EditText.text.toString() == passPhrase2EditText.text.toString() -> {
exportButton.isEnabled = true exportButton.isEnabled = true
passPhrase2Til.error = null passPhrase2Til.error = null
} }
else -> { else -> {
exportButton.isEnabled = false exportButton.isEnabled = false
passPhrase2Til.error = activity.getString(R.string.passphrase_passphrase_does_not_match) passPhrase2Til.error = activity.getString(R.string.passphrase_passphrase_does_not_match)
} }