diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/AddAccountDialog.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/AddAccountDialog.kt index f187e24a..39792b0d 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/AddAccountDialog.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/AddAccountDialog.kt @@ -168,20 +168,26 @@ open class AddAccountDialog : DialogFragment() { } protected open fun bankSelected(bank: BankInfo) { - selectedBank = bank + val didSelectSupportedBank = bank.supportsFinTs3_0 + + selectedBank = if (didSelectSupportedBank) bank else null justDidSelectBank = true - edtxtBank.text = bank.bankCode + " " + bank.name + if (didSelectSupportedBank) { + edtxtBank.text = bank.bankCode + " " + bank.name + } justDidSelectBank = false - edtxtUserName.requestFocus() - checkIfRequiredDataEnteredOnUiThread() - if (bank.supportsFinTs3_0 == false) { + if (didSelectSupportedBank) { + edtxtUserName.requestFocus() + } + else { showBankDoesNotSupportFinTs30ErrorMessage(bank) + edtxtBank.actualEditText.selectAll() } }