diff options
Diffstat (limited to 'wallet/src')
3 files changed, 4 insertions, 9 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/transactions/TransactionManager.kt b/wallet/src/main/java/net/taler/wallet/transactions/TransactionManager.kt index 5b8e577..d5cee16 100644 --- a/wallet/src/main/java/net/taler/wallet/transactions/TransactionManager.kt +++ b/wallet/src/main/java/net/taler/wallet/transactions/TransactionManager.kt @@ -16,7 +16,6 @@ package net.taler.wallet.transactions -import android.util.Log import androidx.annotation.UiThread import androidx.annotation.WorkerThread import androidx.lifecycle.LiveData @@ -81,9 +80,10 @@ class TransactionManager( liveData.postValue(TransactionsResult.Error) return } - Log.e("TEST", result.toString(2)) // TODO remove once API finalized val transactionsArray = result.getString("transactions") val transactions: LinkedList<Transaction> = mapper.readValue(transactionsArray) + // TODO remove when fixed in wallet-core + transactions.sortWith(compareBy({ it.pending }, { it.timestamp.ms }, { it.transactionId })) transactions.reverse() // show latest first mProgress.postValue(false) liveData.postValue(TransactionsResult.Success(transactions)) 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 6dc9af1..55579cc 100644 --- a/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt +++ b/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt @@ -100,7 +100,7 @@ class TransactionPayment( override val icon = R.drawable.ic_cash_usd_outline override val detailPageLayout = R.layout.fragment_transaction_payment override val amountType = AmountType.Negative - override fun getTitle(context: Context) = info.merchant.name ?: info.summary + override fun getTitle(context: Context) = info.merchant.name override val generalTitleRes = R.string.payment_title } @@ -143,11 +143,7 @@ class TransactionRefund( override val detailPageLayout = R.layout.fragment_transaction_payment override val amountType = AmountType.Positive override fun getTitle(context: Context): String { - return if (info.merchant.name == null) { - context.getString(R.string.transaction_refund_for, info.summary) - } else { - context.getString(R.string.transaction_refund_from, info.merchant.name) - } + return context.getString(R.string.transaction_refund_from, info.merchant.name) } override val generalTitleRes = R.string.refund_title } diff --git a/wallet/src/main/res/values/strings.xml b/wallet/src/main/res/values/strings.xml index cddc1d5..e815e9b 100644 --- a/wallet/src/main/res/values/strings.xml +++ b/wallet/src/main/res/values/strings.xml @@ -75,7 +75,6 @@ GNU Taler is immune against many types of fraud, such as phishing of credit card <string name="transaction_tip_from">Tip from %s</string> <string name="transaction_refund">Refund</string> <string name="transaction_refund_from">Refund from %s</string> - <string name="transaction_refund_for">Refund for %s</string> <string name="transaction_pending">PENDING</string> <string name="transaction_refresh">Coin expiry change fee</string> |