From a680b6534cd2b48233f57191a53b93d137f84f92 Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 5 Sep 2024 23:03:11 +0200 Subject: [PATCH] Implemented setting account's displayIndex --- .../kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt b/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt index 0e26e9d9..5f08ffa5 100644 --- a/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt +++ b/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt @@ -120,7 +120,8 @@ open class FinTs4kMapper { protected open fun mapUser(user: net.dankito.banking.client.model.CustomerAccount) = User( user.bankCode, user.loginName, user.password, user.bankName, user.bic, user.customerName, user.userId, - user.accounts.map { mapAccount(it) }, + user.accounts.map { mapAccount(it) }.sortedBy { it.type } + .onEachIndexed { index, bankAccount -> bankAccount.displayIndex = index }, user.selectedTanMethod?.securityFunction?.code, user.tanMethods.map { mapTanMethod(it) }, user.selectedTanMedium?.mediumName, user.tanMedia.map { mapTanMedium(it) },