[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-android] 02/05: [wallet] hide overhead from exchange fee st
From: |
gnunet |
Subject: |
[taler-taler-android] 02/05: [wallet] hide overhead from exchange fee structure if zero |
Date: |
Mon, 13 Apr 2020 20:45:55 +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 42079c0915194351bc417e2396712a11400049b3
Author: Torsten Grote <address@hidden>
AuthorDate: Mon Apr 13 15:07:49 2020 -0300
[wallet] hide overhead from exchange fee structure if zero
---
.../java/net/taler/wallet/withdraw/SelectExchangeFragment.kt | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git
a/wallet/src/main/java/net/taler/wallet/withdraw/SelectExchangeFragment.kt
b/wallet/src/main/java/net/taler/wallet/withdraw/SelectExchangeFragment.kt
index 78eba53..1e7ee3a 100644
--- a/wallet/src/main/java/net/taler/wallet/withdraw/SelectExchangeFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/withdraw/SelectExchangeFragment.kt
@@ -19,6 +19,7 @@ package net.taler.wallet.withdraw
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
+import android.view.View.GONE
import android.view.ViewGroup
import android.widget.TextView
import androidx.core.content.ContextCompat.getColor
@@ -49,8 +50,14 @@ class SelectExchangeFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
val fees = withdrawManager.exchangeFees ?: throw
IllegalStateException()
- withdrawFeeView.setAmount(fees.withdrawFee)
- overheadView.setAmount(fees.overhead)
+ if (fees.withdrawFee.isZero()) {
+ withdrawFeeLabel.visibility = GONE
+ withdrawFeeView.visibility = GONE
+ } else withdrawFeeView.setAmount(fees.withdrawFee)
+ if (fees.overhead.isZero()) {
+ overheadLabel.visibility = GONE
+ overheadView.visibility = GONE
+ } else overheadView.setAmount(fees.overhead)
expirationView.text =
fees.earliestDepositExpiration.ms.toRelativeTime(requireContext())
coinFeesList.adapter = CoinFeeAdapter(fees.coinFees)
wireFeesList.adapter = WireFeeAdapter(fees.wireFees)
--
To stop receiving notification emails like this one, please contact
address@hidden.