summaryrefslogtreecommitdiff
path: root/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2023-03-07 22:51:38 -0600
committerTorsten Grote <t@grobox.de>2023-03-08 14:47:17 -0300
commit34954e4c0c730910ee45dec85a64117aa57023c2 (patch)
tree885046ddc0017e60287fc067998a638c4e57c8c1 /wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt
parent1505aa4aa760e2921888696b7a1bd153576b790a (diff)
downloadtaler-android-34954e4c0c730910ee45dec85a64117aa57023c2.tar.gz
taler-android-34954e4c0c730910ee45dec85a64117aa57023c2.tar.bz2
taler-android-34954e4c0c730910ee45dec85a64117aa57023c2.zip
[wallet] Replace pending with extendedStatus
Diffstat (limited to 'wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt')
-rw-r--r--wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt b/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt
index e65a751..c2f7122 100644
--- a/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt
+++ b/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt
@@ -37,6 +37,7 @@ import net.taler.common.exhaustive
import net.taler.common.toRelativeTime
import net.taler.wallet.R
import net.taler.wallet.handleKyc
+import net.taler.wallet.transactions.ExtendedStatus.Pending
import net.taler.wallet.transactions.TransactionAdapter.TransactionViewHolder
internal class TransactionAdapter(
@@ -101,7 +102,7 @@ internal class TransactionAdapter(
bindActionButton(transaction)
time.text = transaction.timestamp.ms.toRelativeTime(context)
bindAmount(transaction)
- pendingView.visibility = if (transaction.pending) VISIBLE else GONE
+ pendingView.visibility = if (transaction.extendedStatus == Pending) VISIBLE else GONE
val bgColor = getColor(context,
if (selected) R.color.selectedBackground
else android.R.color.transparent)
@@ -150,11 +151,11 @@ internal class TransactionAdapter(
when (transaction.amountType) {
AmountType.Positive -> {
amount.text = context.getString(R.string.amount_positive, amountStr)
- amount.setTextColor(if (transaction.pending) amountColor else green)
+ amount.setTextColor(if (transaction.extendedStatus == Pending) amountColor else green)
}
AmountType.Negative -> {
amount.text = context.getString(R.string.amount_negative, amountStr)
- amount.setTextColor(if (transaction.pending) amountColor else red)
+ amount.setTextColor(if (transaction.extendedStatus == Pending) amountColor else red)
}
AmountType.Neutral -> {
amount.text = amountStr