gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-android] 02/03: [wallet] Removed action button from transac


From: gnunet
Subject: [taler-taler-android] 02/03: [wallet] Removed action button from transaction list
Date: Mon, 10 Apr 2023 22:47:13 +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 c2283c02428005a8ce0dc00df72535e27f7892d9
Author: Iván Ávalos <avalos@disroot.org>
AuthorDate: Mon Apr 10 00:36:35 2023 -0600

    [wallet] Removed action button from transaction list
---
 .../wallet/transactions/TransactionAdapter.kt      | 22 ----------------------
 .../src/main/res/layout/list_item_transaction.xml  | 16 +---------------
 2 files changed, 1 insertion(+), 37 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) {
diff --git a/wallet/src/main/res/layout/list_item_transaction.xml 
b/wallet/src/main/res/layout/list_item_transaction.xml
index 8cd10a8..64d9045 100644
--- a/wallet/src/main/res/layout/list_item_transaction.xml
+++ b/wallet/src/main/res/layout/list_item_transaction.xml
@@ -62,20 +62,6 @@
         tools:text="@string/withdraw_waiting_confirm"
         tools:visibility="visible" />
 
-    <com.google.android.material.button.MaterialButton
-        android:id="@+id/actionButton"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
-        android:visibility="gone"
-        android:textColor="?colorOnPrimary"
-        app:iconTint="?colorOnPrimary"
-        app:backgroundTint="?colorPrimary"
-        app:layout_constraintStart_toStartOf="@id/title"
-        app:layout_constraintTop_toBottomOf="@id/extraInfoView"
-        tools:text="Complete KYC"
-        tools:visibility="visible"/>
-
     <TextView
         android:id="@+id/time"
         android:layout_width="0dp"
@@ -86,7 +72,7 @@
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toStartOf="@+id/barrier"
         app:layout_constraintStart_toStartOf="@+id/title"
-        app:layout_constraintTop_toBottomOf="@+id/actionButton"
+        app:layout_constraintTop_toBottomOf="@+id/extraInfoView"
         tools:text="23 min ago" />
 
     <androidx.constraintlayout.widget.Barrier

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]