From c2283c02428005a8ce0dc00df72535e27f7892d9 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Mon, 10 Apr 2023 00:36:35 -0600 Subject: [wallet] Removed action button from transaction list --- .../wallet/transactions/TransactionAdapter.kt | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'wallet/src/main/java/net/taler/wallet/transactions') 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) { -- cgit v1.2.3