Using now UserAccount. and BankAccount.displayName which both also respect userSetDisplayName

This commit is contained in:
dankito 2024-09-03 02:22:16 +02:00
parent a9cceda7b4
commit 55dec76f36
3 changed files with 5 additions and 5 deletions

View File

@ -76,9 +76,9 @@ fun BottomBar() {
val title = if (selectedAccount == null) { val title = if (selectedAccount == null) {
"Bankmeister" "Bankmeister"
} else if (selectedAccount.bankAccount != null) { } else if (selectedAccount.bankAccount != null) {
selectedAccount.bankAccount.productName ?: selectedAccount.bankAccount.identifier selectedAccount.bankAccount.displayName
} else { } else {
selectedAccount.userAccount.bankName selectedAccount.userAccount.displayName
} }
Text(title, color = color, maxLines = 1, overflow = TextOverflow.Ellipsis) Text(title, color = color, maxLines = 1, overflow = TextOverflow.Ellipsis)

View File

@ -37,12 +37,12 @@ fun BanksList(
userAccounts.value.sortedBy { it.displayIndex }.forEach { userAccount -> userAccounts.value.sortedBy { it.displayIndex }.forEach { userAccount ->
Spacer(Modifier.fillMaxWidth().height(12.dp)) Spacer(Modifier.fillMaxWidth().height(12.dp))
NavigationMenuItem(itemModifier, userAccount.bankName, textColor, iconSize, IconTextSpacing, itemHorizontalPadding, userAccount, iconResource = Res.drawable.account) { NavigationMenuItem(itemModifier, userAccount.displayName, textColor, iconSize, IconTextSpacing, itemHorizontalPadding, userAccount, iconResource = Res.drawable.account) {
accountSelected?.invoke(userAccount, null) accountSelected?.invoke(userAccount, null)
} }
userAccount.accounts.sortedBy { it.displayIndex }.forEach { account -> userAccount.accounts.sortedBy { it.displayIndex }.forEach { account ->
NavigationMenuItem(itemModifier, account.productName ?: account.identifier, textColor, iconSize, IconTextSpacing, itemHorizontalPadding, bankAccount = account) { NavigationMenuItem(itemModifier, account.displayName, textColor, iconSize, IconTextSpacing, itemHorizontalPadding, bankAccount = account) {
accountSelected?.invoke(userAccount, account) accountSelected?.invoke(userAccount, account)
} }
} }

View File

@ -71,7 +71,7 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () ->
Row { Row {
BankIcon(challenge.user, Modifier.padding(end = 6.dp)) BankIcon(challenge.user, Modifier.padding(end = 6.dp))
Text("${challenge.user.bankName}, Nutzer ${challenge.user.loginName}${challenge.account?.let { ", Konto ${it.productName ?: it.identifier}" } ?: ""}") Text("${challenge.user.displayName}, Nutzer ${challenge.user.loginName}${challenge.account?.let { ", Konto ${it.productName ?: it.identifier}" } ?: ""}")
} }
Text( Text(
"TAN benötigt ${Internationalization.getTextForActionRequiringTan(challenge.forAction)}", "TAN benötigt ${Internationalization.getTextForActionRequiringTan(challenge.forAction)}",