Fixed that by default "null" has been displayed for amount

This commit is contained in:
dankito 2024-09-26 04:49:06 +02:00
parent 6ac2faf207
commit b13be27a2d
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ fun TransferMoneyDialog(
var recipientName by remember { mutableStateOf(data.recipientName ?: "") }
var recipientAccountIdentifier by remember { mutableStateOf(data.recipientAccountIdentifier ?: "") }
var amount by remember { mutableStateOf(data.amount.toString()) }
var amount by remember { mutableStateOf(data.amount?.toString() ?: "") }
var paymentReference by remember { mutableStateOf(data.reference ?: "") }
val accountSupportsInstantTransfer by remember(senderAccount) { derivedStateOf { senderAccount.supportsInstantTransfer } }
var instantTransfer by remember { mutableStateOf(false) }
@ -205,8 +205,8 @@ fun TransferMoneyDialog(
getItemTitle = { suggestion -> suggestion.amount.toString() },
onEnteredTextChanged = { amount = it },
onSelectedItemChanged = {
amount = it?.amount.toString()
if (it != null) {
amount = it.amount.toString()
paymentReference = it.reference
}
},