taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

commit 2f0b4a8ba263325f28701a001af2635b7fa96498
parent 2f4e8d6577c1cf3a8e00e9e43ac54e70c7c14b71
Author: Iván Ávalos <avalos@disroot.org>
Date:   Wed, 30 Apr 2025 21:31:08 +0200

[wallet] render dialog transactions as "pending"

Diffstat:
Mwallet/src/main/java/net/taler/wallet/transactions/TransactionsComposable.kt | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/wallet/src/main/java/net/taler/wallet/transactions/TransactionsComposable.kt b/wallet/src/main/java/net/taler/wallet/transactions/TransactionsComposable.kt @@ -90,6 +90,7 @@ import net.taler.wallet.transactions.TransactionAction.Retry import net.taler.wallet.transactions.TransactionAction.Suspend import net.taler.wallet.transactions.TransactionMajorState.Aborted import net.taler.wallet.transactions.TransactionMajorState.Aborting +import net.taler.wallet.transactions.TransactionMajorState.Dialog import net.taler.wallet.transactions.TransactionMajorState.Done import net.taler.wallet.transactions.TransactionMajorState.Failed import net.taler.wallet.transactions.TransactionMajorState.Pending @@ -423,19 +424,19 @@ fun TransactionAmountInfo( when (tx.amountType) { Positive -> Text( stringResource(R.string.amount_positive, amountStr), - color = if (tx.txState.major == Pending) + color = if (tx.txState.major == Pending || tx.txState.major == Dialog) Color.Unspecified else colorResource(R.color.green), ) Negative -> Text( stringResource(R.string.amount_negative, amountStr), - color = if (tx.txState.major == Pending) + color = if (tx.txState.major == Pending || tx.txState.major == Dialog) Color.Unspecified else MaterialTheme.colorScheme.error, ) Neutral -> Text(amountStr) } } - if (tx.txState.major == Pending) { + if (tx.txState.major == Pending || tx.txState.major == Dialog) { Badge(Modifier.padding(top = 3.dp)) { Text(stringResource(R.string.transaction_pending)) } @@ -473,6 +474,8 @@ fun TransactionExtraInfo(tx: Transaction) { else -> Text(stringResource(R.string.transaction_pending)) } + tx.txState.major == Dialog -> Text(stringResource(R.string.transaction_pending)) + tx is TransactionWithdrawal && !tx.confirmed -> Text(stringResource(R.string.withdraw_waiting_confirm)) tx is TransactionPeerPushCredit && tx.info.summary != null -> Text(tx.info.summary) tx is TransactionPeerPushDebit && tx.info.summary != null -> Text(tx.info.summary)