summaryrefslogtreecommitdiff
path: root/wallet/src/main/java/net/taler/wallet/transactions
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2023-04-10 00:36:35 -0600
committerTorsten Grote <t@grobox.de>2023-04-10 17:29:39 -0300
commitc2283c02428005a8ce0dc00df72535e27f7892d9 (patch)
tree91d2fabc8f4042216120a5b4415df8eacdf71882 /wallet/src/main/java/net/taler/wallet/transactions
parent87cc3e28dfc4a2702a75ea3075ca7ac400ce719c (diff)
downloadtaler-android-c2283c02428005a8ce0dc00df72535e27f7892d9.tar.gz
taler-android-c2283c02428005a8ce0dc00df72535e27f7892d9.tar.bz2
taler-android-c2283c02428005a8ce0dc00df72535e27f7892d9.zip
[wallet] Removed action button from transaction list
Diffstat (limited to 'wallet/src/main/java/net/taler/wallet/transactions')
-rw-r--r--wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt22
1 files changed, 0 insertions, 22 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 c2f7122..69c1a8a 100644
--- a/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt
+++ b/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt
@@ -32,11 +32,9 @@ import androidx.recyclerview.selection.SelectionTracker
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.Adapter
import androidx.recyclerview.widget.RecyclerView.ViewHolder
-import com.google.android.material.button.MaterialButton
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
@@ -81,7 +79,6 @@ internal class TransactionAdapter(
private val icon: ImageView = v.findViewById(R.id.icon)
private val title: TextView = v.findViewById(R.id.title)
private val extraInfoView: TextView = v.findViewById(R.id.extraInfoView)
- private val actionButton: MaterialButton = v.findViewById(R.id.actionButton)
private val time: TextView = v.findViewById(R.id.time)
private val amount: TextView = v.findViewById(R.id.amount)
private val pendingView: TextView = v.findViewById(R.id.pendingView)
@@ -99,7 +96,6 @@ internal class TransactionAdapter(
}
title.text = transaction.getTitle(context)
bindExtraInfo(transaction)
- bindActionButton(transaction)
time.text = transaction.timestamp.ms.toRelativeTime(context)
bindAmount(transaction)
pendingView.visibility = if (transaction.extendedStatus == Pending) VISIBLE else GONE
@@ -128,24 +124,6 @@ internal class TransactionAdapter(
}
}
- private fun bindActionButton(t: Transaction) {
- actionButton.setOnClickListener { listener.onActionButtonClicked(t) }
- if (t.error != null) {
- actionButton.visibility = t.handleKyc({ GONE }) {
- actionButton.setText(R.string.transaction_action_kyc)
- VISIBLE
- }
- } else if (t is TransactionWithdrawal && !t.confirmed) {
- actionButton.setIconResource(R.drawable.ic_account_balance)
- actionButton.visibility =
- if (t.withdrawalDetails is WithdrawalDetails.TalerBankIntegrationApi &&
- t.withdrawalDetails.bankConfirmationUrl != null) {
- actionButton.setText(R.string.withdraw_button_confirm_bank)
- VISIBLE
- } else GONE
- }
- }
-
private fun bindAmount(transaction: Transaction) {
val amountStr = transaction.amountEffective.amountStr
when (transaction.amountType) {