From d618556f5bd8faf0c99396c07602861cc345d9d9 Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 11 Sep 2024 16:29:20 +0200 Subject: [PATCH] If otherPartyName is not set showing postingText instead --- .../banking/ui/composables/transactions/TransactionListItem.kt | 2 +- .../net/codinux/banking/ui/model/AccountTransactionViewModel.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/transactions/TransactionListItem.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/transactions/TransactionListItem.kt index 33cea56..b75cc62 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/transactions/TransactionListItem.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/transactions/TransactionListItem.kt @@ -81,7 +81,7 @@ fun TransactionListItem(user: User?, transaction: AccountTransactionViewModel, i } Text( - text = transaction.otherPartyName ?: "", + text = transaction.otherPartyName ?: transaction.postingText ?: "", Modifier.fillMaxWidth(), fontWeight = FontWeight.Bold, maxLines = 1, diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/model/AccountTransactionViewModel.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/model/AccountTransactionViewModel.kt index d03fe5f..d692261 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/model/AccountTransactionViewModel.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/model/AccountTransactionViewModel.kt @@ -16,7 +16,7 @@ data class AccountTransactionViewModel( val valueDate: LocalDate, val otherPartyName: String? = null, - val bookingText: String? = null, + val postingText: String? = null, val userSetDisplayName: String? = null, val category: String? = null ) {