Showing account selection composable if more than one account is available
This commit is contained in:
parent
612341cf45
commit
91c75a388d
|
@ -116,16 +116,18 @@ fun TransferMoneyDialog(
|
||||||
onDismiss = onDismiss,
|
onDismiss = onDismiss,
|
||||||
onConfirm = { confirmCalled() }
|
onConfirm = { confirmCalled() }
|
||||||
) {
|
) {
|
||||||
Select(
|
if (accountsSupportingTransferringMoney.size > 1) {
|
||||||
"Konto", "Alle Konten anzeigen",
|
Select(
|
||||||
accountsSupportingTransferringMoney, senderAccount, { senderAccount = it },
|
"Konto", "Alle Konten anzeigen",
|
||||||
{ account -> "${accountsToUserAccount[account]?.displayName} ${account.displayName}" },
|
accountsSupportingTransferringMoney, senderAccount, { senderAccount = it },
|
||||||
{ BankIcon(accountsToUserAccount[senderAccount]) }
|
{ account -> "${accountsToUserAccount[account]?.displayName} ${account.displayName}" },
|
||||||
) { account ->
|
{ BankIcon(accountsToUserAccount[senderAccount]) }
|
||||||
Row(Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
) { account ->
|
||||||
BankIcon(accountsToUserAccount[account], Modifier.padding(end = 6.dp))
|
Row(Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||||
|
BankIcon(accountsToUserAccount[account], Modifier.padding(end = 6.dp))
|
||||||
|
|
||||||
Text("${accountsToUserAccount[account]?.displayName} ${account.displayName}")
|
Text("${accountsToUserAccount[account]?.displayName} ${account.displayName}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue