From c6f821d162b414e7de6fdaf55eb6e51b2b6f8230 Mon Sep 17 00:00:00 2001 From: dankl Date: Sat, 11 Jan 2020 23:22:52 +0100 Subject: [PATCH] Extracted BankAccount.displayNameIncludingBankName --- .../main/java/net/dankito/banking/ui/model/BankAccount.kt | 5 ++++- .../fints4java/android/ui/adapter/BankAccountsAdapter.kt | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/BankAccount.kt b/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/BankAccount.kt index 3b076c36..0cc270a6 100644 --- a/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/BankAccount.kt +++ b/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/BankAccount.kt @@ -21,7 +21,7 @@ open class BankAccount @JvmOverloads constructor( val displayName: String get() { - var displayName = "${account.bank.name} ${identifier}" + var displayName = identifier subAccountNumber?.let { displayName += " ($it)" } @@ -29,6 +29,9 @@ open class BankAccount @JvmOverloads constructor( return displayName } + val displayNameIncludingBankName: String + get() = "${account.bank.name} ${displayName}" + var bookedTransactions: List = bookedAccountTransactions protected set diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/BankAccountsAdapter.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/BankAccountsAdapter.kt index 9723cf20..26e9b26f 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/BankAccountsAdapter.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/BankAccountsAdapter.kt @@ -20,7 +20,7 @@ open class BankAccountsAdapter(bankAccounts: List) : ListAdapter