gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-android] branch master updated (5634d46 -> f5213b2)


From: gnunet
Subject: [taler-taler-android] branch master updated (5634d46 -> f5213b2)
Date: Wed, 22 Feb 2023 15:43:26 +0100

This is an automated email from the git hooks/post-receive script.

torsten-grote pushed a change to branch master
in repository taler-android.

    from 5634d46  [wallet] release 0.9.2
     new dfaf852  [wallet] properly show fee prefix for incoming peer 
debit/credit
     new f5213b2  Give gradle more memory, because CI saw OOM errors

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 gradle.properties                                            |  2 +-
 .../main/java/net/taler/wallet/peer/IncomingComposable.kt    | 12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/gradle.properties b/gradle.properties
index 8a57460..5804e8b 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -6,7 +6,7 @@
 # http://www.gradle.org/docs/current/userguide/build_environment.html
 # Specifies the JVM arguments used for the daemon process.
 # The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
+org.gradle.jvmargs=-Xmx4096m
 org.gradle.configureondemand=true
 # When configured, Gradle will run in incubating parallel mode.
 # This option should only be used with decoupled projects. More details, visit
diff --git a/wallet/src/main/java/net/taler/wallet/peer/IncomingComposable.kt 
b/wallet/src/main/java/net/taler/wallet/peer/IncomingComposable.kt
index 11867f3..2e2ed8a 100644
--- a/wallet/src/main/java/net/taler/wallet/peer/IncomingComposable.kt
+++ b/wallet/src/main/java/net/taler/wallet/peer/IncomingComposable.kt
@@ -52,16 +52,19 @@ import 
net.taler.wallet.backend.TalerErrorCode.WALLET_WITHDRAWAL_KYC_REQUIRED
 import net.taler.wallet.backend.TalerErrorInfo
 
 data class IncomingData(
+    val isCredit: Boolean,
     @StringRes val intro: Int,
     @StringRes val button: Int,
 )
 
 val incomingPush = IncomingData(
+    isCredit = true,
     intro = R.string.receive_peer_payment_intro,
     button = R.string.receive_peer_payment_title,
 )
 
 val incomingPull = IncomingData(
+    isCredit = false,
     intro = R.string.pay_peer_intro,
     button = R.string.payment_button_confirm,
 )
@@ -140,14 +143,19 @@ fun ColumnScope.PeerPullTermsComposable(
                 )
             }
             // this gets used for credit and debit, so fee calculation differs
-            val fee = if (terms.amountRaw > terms.amountEffective) {
+            val fee = if (data.isCredit) {
                 terms.amountRaw - terms.amountEffective
             } else {
                 terms.amountEffective - terms.amountRaw
             }
+            val feeStr = if (data.isCredit) {
+                stringResource(R.string.amount_negative, fee)
+            } else {
+                stringResource(R.string.amount_positive, fee)
+            }
             if (!fee.isZero()) Text(
                 modifier = Modifier.align(End),
-                text = stringResource(id = R.string.amount_negative, fee),
+                text = feeStr,
                 style = MaterialTheme.typography.bodyLarge,
                 color = MaterialTheme.colorScheme.error,
             )

-- 
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]