diff options
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.kt | 8 |
1 files changed, 4 insertions, 4 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 69c1a8a..dd46a92 100644 --- a/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt +++ b/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt @@ -35,8 +35,8 @@ import androidx.recyclerview.widget.RecyclerView.ViewHolder import net.taler.common.exhaustive import net.taler.common.toRelativeTime import net.taler.wallet.R -import net.taler.wallet.transactions.ExtendedStatus.Pending import net.taler.wallet.transactions.TransactionAdapter.TransactionViewHolder +import net.taler.wallet.transactions.TransactionMajorState.Pending internal class TransactionAdapter( private val listener: OnTransactionClickListener @@ -98,7 +98,7 @@ internal class TransactionAdapter( bindExtraInfo(transaction) time.text = transaction.timestamp.ms.toRelativeTime(context) bindAmount(transaction) - pendingView.visibility = if (transaction.extendedStatus == Pending) VISIBLE else GONE + pendingView.visibility = if (transaction.txState.major == Pending) VISIBLE else GONE val bgColor = getColor(context, if (selected) R.color.selectedBackground else android.R.color.transparent) @@ -129,11 +129,11 @@ internal class TransactionAdapter( when (transaction.amountType) { AmountType.Positive -> { amount.text = context.getString(R.string.amount_positive, amountStr) - amount.setTextColor(if (transaction.extendedStatus == Pending) amountColor else green) + amount.setTextColor(if (transaction.txState.major == Pending) amountColor else green) } AmountType.Negative -> { amount.text = context.getString(R.string.amount_negative, amountStr) - amount.setTextColor(if (transaction.extendedStatus == Pending) amountColor else red) + amount.setTextColor(if (transaction.txState.major == Pending) amountColor else red) } AmountType.Neutral -> { amount.text = amountStr |