Implemented setting account's displayIndex

This commit is contained in:
dankito 2024-09-05 23:03:11 +02:00
parent cb45c181ae
commit a680b6534c
1 changed files with 2 additions and 1 deletions

View File

@ -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) },