Implemented that if selected bank is not supported its name does not get set in edtxtBank and edtxtUserName does not get focused but all text in edtxtBank gets selected, so that it can be easily deleted
This commit is contained in:
parent
7e0ab6ec9d
commit
78ad6540a1
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue