Using sorted methods from new BankingClient version
This commit is contained in:
parent
4a5748b813
commit
f5a93bdddd
|
@ -55,4 +55,14 @@ class BankAccessEntity(
|
|||
bank.iconUrl, bank.wrongCredentialsEntered,
|
||||
)
|
||||
|
||||
|
||||
override val accountsSorted: List<BankAccountEntity>
|
||||
get() = accounts.sortedBy { it.displayIndex }
|
||||
|
||||
override val tanMethodsSorted: List<TanMethodEntity>
|
||||
get() = tanMethods.sortedBy { it.identifier }
|
||||
|
||||
override val tanMediaSorted: List<TanMediumEntity>
|
||||
get() = tanMedia.sortedBy { it.status }
|
||||
|
||||
}
|
|
@ -44,7 +44,7 @@ fun BanksList(
|
|||
accountSelected?.invoke(bank, null)
|
||||
}
|
||||
|
||||
bank.accounts.sortedBy { it.displayIndex }.forEach { account ->
|
||||
bank.accountsSorted.forEach { account ->
|
||||
NavigationMenuItem(itemModifier, account.displayName, textColor, iconSize, IconTextSpacing, itemHorizontalPadding, bankAccount = account) {
|
||||
accountSelected?.invoke(bank, account)
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ fun TransferMoneyDialog(
|
|||
) {
|
||||
val banks = uiState.banks.value
|
||||
val accountsToBank = banks.sortedBy { it.displayIndex }
|
||||
.flatMap { bank -> bank.accounts.sortedBy { it.displayIndex }.map { it to bank } }.toMap()
|
||||
.flatMap { bank -> bank.accountsSorted.map { it to bank } }.toMap()
|
||||
|
||||
val accountsSupportingTransferringMoney = banks.flatMap { it.accounts }
|
||||
.filter { it.supportsMoneyTransfer }
|
||||
|
|
|
@ -56,7 +56,7 @@ fun BankSettingsScreen(bank: BankAccessEntity, onClosed: () -> Unit) {
|
|||
SectionHeader("Konten")
|
||||
|
||||
Column(Modifier.padding(top = 8.dp)) {
|
||||
bank.accounts.sortedBy { it.displayIndex }.forEach { account ->
|
||||
bank.accountsSorted.forEach { account ->
|
||||
FormListItem(account.displayName, itemHeight = 42.dp) {
|
||||
DI.uiState.showBankAccountSettingsScreenForAccount.value = account
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ fun BankSettingsScreen(bank: BankAccessEntity, onClosed: () -> Unit) {
|
|||
SectionHeader("TAN Verfahren")
|
||||
|
||||
Column(Modifier.padding(top = 8.dp)) {
|
||||
bank.tanMethods.sortedBy { it.identifier }.forEach { tanMethod ->
|
||||
bank.tanMethodsSorted.forEach { tanMethod ->
|
||||
SelectableFormListItem(tanMethod.displayName, tanMethod == bank.selectedTanMethod, "TAN Verfahren ist ausgewähltes TAN Verfahren")
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ fun BankSettingsScreen(bank: BankAccessEntity, onClosed: () -> Unit) {
|
|||
SectionHeader("TAN Medien")
|
||||
|
||||
Column(Modifier.padding(top = 8.dp)) {
|
||||
bank.tanMedia.sortedBy { it.status }.forEach { tanMedium ->
|
||||
bank.tanMediaSorted.forEach { tanMedium ->
|
||||
SelectableFormListItem(tanMedium.displayName, tanMedium == bank.selectedTanMedium, "TAN Medium ist ausgewähltes TAN Medium")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue