Implemented displaying name of account that failed

This commit is contained in:
dankito 2020-05-25 19:07:37 +02:00
parent 9ebc23016c
commit 5384cd6b68
3 changed files with 5 additions and 4 deletions

View File

@ -161,8 +161,9 @@ class HomeFragment : Fragment() {
updateTransactionsToDisplayOnUiThread() updateTransactionsToDisplayOnUiThread()
} }
else if (response.userCancelledAction == false) { // if user cancelled entering TAN then don't show a error message else if (response.userCancelledAction == false) { // if user cancelled entering TAN then don't show a error message
AlertDialog.Builder(activity) // TODO: may show account name in message AlertDialog.Builder(activity)
.setMessage(activity.getString(R.string.fragment_home_could_not_retrieve_account_transactions, response.errorToShowToUser)) .setMessage(activity.getString(R.string.fragment_home_could_not_retrieve_account_transactions,
response.bankAccount.displayName, response.errorToShowToUser))
.setPositiveButton(android.R.string.ok) { dialog, _ -> dialog.dismiss() } .setPositiveButton(android.R.string.ok) { dialog, _ -> dialog.dismiss() }
.show() .show()
} }

View File

@ -28,7 +28,7 @@
<string name="menu_main_update_transactions">Umsätze aktualisieren</string> <string name="menu_main_update_transactions">Umsätze aktualisieren</string>
<string name="fragment_home_could_not_retrieve_account_transactions">Kontoumsätze konnten nicht empfangen werden.\n\nFehlermeldung Ihrer Bank:\n\n%s</string> <string name="fragment_home_could_not_retrieve_account_transactions">Kontoumsätze für \'%1$s\' konnten nicht empfangen werden.\n\nFehlermeldung Ihrer Bank:\n\n%2$s</string>
<string name="fragment_home_transfer_money_to">Neue Überweisung an %s</string> <string name="fragment_home_transfer_money_to">Neue Überweisung an %s</string>
<string name="dialog_add_account_enter_bank_code">Bankleitzahl (Suche auch mittels Bankname oder Ort):</string> <string name="dialog_add_account_enter_bank_code">Bankleitzahl (Suche auch mittels Bankname oder Ort):</string>

View File

@ -28,7 +28,7 @@
<string name="menu_main_update_transactions">Update transactions</string> <string name="menu_main_update_transactions">Update transactions</string>
<string name="fragment_home_could_not_retrieve_account_transactions">Could not retrieve account transactions.\n\nError message from your bank:\n\n%s</string> <string name="fragment_home_could_not_retrieve_account_transactions">Could not retrieve account transactions for \'%1$s\'.\n\nError message from your bank:\n\n%2$s</string>
<string name="fragment_home_transfer_money_to">Transfer money to %s</string> <string name="fragment_home_transfer_money_to">Transfer money to %s</string>
<string name="dialog_add_account_enter_bank_code">Bank code (find also by bank name or city):</string> <string name="dialog_add_account_enter_bank_code">Bank code (find also by bank name or city):</string>