summaryrefslogtreecommitdiff
path: root/wallet/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2023-12-12 13:32:58 -0600
committerIván Ávalos <avalos@disroot.org>2024-01-08 14:45:46 -0600
commite2e65738838fb9bebedd8721c4bbd2d28483c709 (patch)
tree7b609f1d18d9ea33f45109e2c5f34dd2f71575f9 /wallet/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt
parentd3d7a4afb72505606c80a0c377d5f72860127878 (diff)
downloadtaler-android-e2e65738838fb9bebedd8721c4bbd2d28483c709.tar.gz
taler-android-e2e65738838fb9bebedd8721c4bbd2d28483c709.tar.bz2
taler-android-e2e65738838fb9bebedd8721c4bbd2d28483c709.zip
[wallet] Manual withdrawal: hide fee when zero and relax paddings for smaller screens
Diffstat (limited to 'wallet/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt')
-rw-r--r--wallet/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt10
1 files changed, 6 insertions, 4 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt b/wallet/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt
index fd67e71..caad7b6 100644
--- a/wallet/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt
@@ -164,10 +164,12 @@ class PromptWithdrawFragment : Fragment() {
ui.chosenAmountView.text = amountRaw.toString()
ui.chosenAmountView.fadeIn()
- ui.feeLabel.fadeIn()
- ui.feeView.text =
- getString(R.string.amount_negative, (amountRaw - amountEffective).toString())
- ui.feeView.fadeIn()
+ val fee = amountRaw - amountEffective
+ if (!fee.isZero()) {
+ ui.feeLabel.fadeIn()
+ ui.feeView.text = getString(R.string.amount_negative, fee.toString())
+ ui.feeView.fadeIn()
+ }
ui.exchangeIntroView.fadeIn()
ui.withdrawExchangeUrl.text = cleanExchange(exchange)