From 80680a16b64db1dce9afc0b098117666d51e98a0 Mon Sep 17 00:00:00 2001 From: dankito Date: Sat, 13 Jun 2020 15:59:52 +0200 Subject: [PATCH] Fixed that if creditorIban is empty, then empty search result overrides creditorBic --- .../banking/ui/android/dialogs/TransferMoneyDialog.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/TransferMoneyDialog.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/TransferMoneyDialog.kt index fabd10cd..e1024ae6 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/TransferMoneyDialog.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/TransferMoneyDialog.kt @@ -198,8 +198,11 @@ open class TransferMoneyDialog : DialogFragment() { preselectedValues?.let { data -> rootView.edtxtRemitteeName.setText(data.creditorName) - rootView.edtxtRemitteeIban.setText(data.creditorIban) + if (data.creditorIban.isNotBlank()) { // set only if creditorIban has a value as otherwise creditorBic would be overridden by empty search result + rootView.edtxtRemitteeIban.setText(data.creditorIban) + } + // a little bit inconsistent as if IBAN is not set bank's name won't be displayed even though it can be retrieved by BIC rootView.edtxtRemitteeBic.setText(data.creditorBic) if (data.amount > BigDecimal.ZERO) {