diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/EnterTanDialog.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/EnterTanDialog.kt index fd41f11..952faad 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/EnterTanDialog.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/EnterTanDialog.kt @@ -88,7 +88,7 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () -> Row(Modifier.padding(top = 16.dp)) { Select( - "TAN Verfahren", "Alle TAN Medien anzeigen", + "TAN Verfahren", challenge.availableTanMethods.sortedBy { it.identifier }, challenge.selectedTanMethod, { Log.info { "User selected TanMethod $it" } }, // TODO: change TanMethod @@ -99,7 +99,7 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () -> if (challenge.availableTanMedia.isNotEmpty()) { Row(Modifier.padding(top = 16.dp)) { Select( - "TAN Medium", "Alle TAN Medien anzeigen", + "TAN Medium", challenge.availableTanMedia.sortedBy { it.status }.map { it.displayName }, challenge.selectedTanMedium?.displayName ?: "", { Log.info { "User selected TanMedium $it" } }, // TODO: change TanMethod diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/TransferMoneyDialog.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/TransferMoneyDialog.kt index e180698..f23dd84 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/TransferMoneyDialog.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/TransferMoneyDialog.kt @@ -118,7 +118,7 @@ fun TransferMoneyDialog( ) { if (accountsSupportingTransferringMoney.size > 1) { Select( - "Konto", "Alle Konten anzeigen", + "Konto", accountsSupportingTransferringMoney, senderAccount, { senderAccount = it }, { account -> "${accountsToUserAccount[account]?.displayName} ${account.displayName}" }, { BankIcon(accountsToUserAccount[senderAccount]) } diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/Select.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/Select.kt index 5c983f6..29ca7fe 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/Select.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/Select.kt @@ -2,9 +2,6 @@ package net.codinux.banking.ui.forms import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.material.* -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowDropDown -import androidx.compose.material.icons.filled.ArrowDropUp import androidx.compose.runtime.* import androidx.compose.ui.Modifier @@ -12,7 +9,6 @@ import androidx.compose.ui.Modifier @Composable fun Select( label: String, - contentDescription: String, items: Collection, selectedItem: T, onSelectedItemChanged: (T) -> Unit, @@ -30,13 +26,7 @@ fun Select( label = { Text(label) }, readOnly = true, maxLines = 1, - trailingIcon = { - if (showDropDownMenu) { - Icon(Icons.Filled.ArrowDropUp, contentDescription) - } else { - Icon(Icons.Filled.ArrowDropDown, contentDescription) - } - }, + trailingIcon = { ExposedDropdownMenuDefaults.TrailingIcon(showDropDownMenu) }, leadingIcon = leadingIcon )