Fixed that loginName got focused even though no bank was selected

This commit is contained in:
dankito 2024-09-09 22:52:13 +02:00
parent a257223543
commit 685adad6b3
1 changed files with 4 additions and 4 deletions

View File

@ -90,9 +90,7 @@ fun AddAccountDialog(
showProgressIndicatorOnConfirmButton = isAddingAccount, showProgressIndicatorOnConfirmButton = isAddingAccount,
useMoreThanPlatformDefaultWidthOnMobile = true, useMoreThanPlatformDefaultWidthOnMobile = true,
onDismiss = { dismiss() }, onDismiss = { dismiss() },
onConfirm = { onConfirm = { confirmCalled() }
confirmCalled()
}
) { ) {
Column { Column {
@ -102,7 +100,9 @@ fun AddAccountDialog(
onEnteredTextChanged = { enteredBankSearchQuery = it }, onEnteredTextChanged = { enteredBankSearchQuery = it },
onSelectedItemChanged = { onSelectedItemChanged = {
selectedBank = it selectedBank = it
loginNameFocus.requestFocus() if (it != null) {
loginNameFocus.requestFocus()
}
}, },
getItemTitle = { bank -> bank.name }, getItemTitle = { bank -> bank.name },
fetchSuggestions = { query -> bankingService.findBanks(query) } fetchSuggestions = { query -> bankingService.findBanks(query) }