[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-android] 02/02: [wallet] Implement detail page for refresh
From: |
gnunet |
Subject: |
[taler-taler-android] 02/02: [wallet] Implement detail page for refresh transaction |
Date: |
Tue, 19 May 2020 20:17:50 +0200 |
This is an automated email from the git hooks/post-receive script.
torsten-grote pushed a commit to branch master
in repository taler-android.
commit 17fe2f70c3d0f34b11db9e4e66ef489bbeae7065
Author: Torsten Grote <address@hidden>
AuthorDate: Tue May 19 15:11:27 2020 -0300
[wallet] Implement detail page for refresh transaction
---
.../taler/wallet/transactions/TransactionDetailFragment.kt | 14 +++++++++++++-
.../java/net/taler/wallet/transactions/Transactions.kt | 2 +-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git
a/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt
b/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt
index 6b58824..f78d98f 100644
---
a/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt
+++
b/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt
@@ -73,9 +73,10 @@ class TransactionDetailFragment : Fragment() {
is TransactionWithdrawal -> bind(e)
is TransactionPayment -> bind(e)
is TransactionRefund -> bind(e)
+ is TransactionRefresh -> bind(e)
else -> Toast.makeText(
requireContext(),
- "event ${e.javaClass} not implement",
+ "Transaction ${e.javaClass.simpleName} not implemented.",
LENGTH_LONG
).show()
}
@@ -125,6 +126,17 @@ class TransactionDetailFragment : Fragment() {
bindOrderAndFee(t.info, t.amountRaw, fee)
}
+ private fun bind(t: TransactionRefresh) {
+ effectiveAmountLabel.visibility = GONE
+ effectiveAmountView.visibility = GONE
+ confirmWithdrawalButton.visibility = GONE
+ chosenAmountLabel.visibility = GONE
+ chosenAmountView.visibility = GONE
+ val fee = t.amountEffective
+ feeView.text = getString(R.string.amount_negative, fee.toString())
+ exchangeView.text = cleanExchange(t.exchangeBaseUrl)
+ }
+
private fun bindOrderAndFee(info: TransactionInfo, raw: Amount, fee:
Amount) {
orderAmountView.text = raw.toString()
feeView.text = getString(R.string.amount_negative, fee.toString())
diff --git a/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt
b/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt
index 8567259..27384d8 100644
--- a/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt
+++ b/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt
@@ -190,7 +190,7 @@ class TransactionRefresh(
amountEffective: Amount
) : Transaction(transactionId, timestamp, pending, error, amountRaw,
amountEffective) {
override val icon = R.drawable.transaction_refresh
- override val detailPageLayout = R.layout.fragment_transaction_payment
+ override val detailPageLayout = R.layout.fragment_transaction_withdrawal
override val amountType = AmountType.Negative
override fun getTitle(context: Context): String {
return context.getString(R.string.transaction_refresh)
--
To stop receiving notification emails like this one, please contact
address@hidden.