Showing an error message if selected bank does not support FinTS 3.0
This commit is contained in:
parent
9e41fa2cac
commit
149d409dbc
|
@ -183,6 +183,21 @@ open class AddAccountDialog : DialogFragment() {
|
|||
edtxtBankCode.clearListSelection()
|
||||
|
||||
checkIfRequiredDataEnteredOnUiThread()
|
||||
|
||||
if (bank.supportsFinTs3_0 == false) {
|
||||
showBankDoesNotSupportFinTs30ErrorMessage(bank)
|
||||
}
|
||||
}
|
||||
|
||||
private fun showBankDoesNotSupportFinTs30ErrorMessage(bank: BankInfo) {
|
||||
activity?.let { context ->
|
||||
val errorMessage = context.getString(R.string.dialog_add_account_bank_does_not_support_fints_3_error_message, bank.name)
|
||||
|
||||
AlertDialog.Builder(context)
|
||||
.setMessage(errorMessage)
|
||||
.setPositiveButton(android.R.string.ok) { dialog, _ -> dialog.dismiss() }
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
||||
protected open fun checkIfRequiredDataEnteredOnUiThread() {
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
<string name="dialog_add_account_enter_customer_id">Customer Id:</string>
|
||||
<string name="dialog_add_account_enter_pin">Pin:</string>
|
||||
<string name="dialog_add_account_add">Add</string>
|
||||
<string name="dialog_add_account_bank_does_not_support_fints_3_error_message">%s does not support FinTS 3.0 and therefore cannot be used in this application.</string>
|
||||
<string name="dialog_add_account_message_could_not_add_account">Could not add account: %s</string>
|
||||
<string name="dialog_add_account_message_successfully_added_account">
|
||||
Successfully added account.
|
||||
|
|
Loading…
Reference in New Issue