summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-03-16 09:45:57 -0300
committerTorsten Grote <t@grobox.de>2020-03-16 09:45:57 -0300
commitd041ac62019394f9706eb754c59bcce3d6febe2e (patch)
tree2982bf1eef97074e0a8cedc57ae26f88b8a3a315
parentd3cc4bb7c7c70b4c913ae6f893aa1a760a3fa179 (diff)
downloadwallet-android-d041ac62019394f9706eb754c59bcce3d6febe2e.tar.gz
wallet-android-d041ac62019394f9706eb754c59bcce3d6febe2e.tar.bz2
wallet-android-d041ac62019394f9706eb754c59bcce3d6febe2e.zip
Show product details by default, if there's only one product
-rw-r--r--app/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt b/app/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt
index 5a53556..44dcf26 100644
--- a/app/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt
+++ b/app/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt
@@ -142,6 +142,7 @@ class PromptPaymentFragment : Fragment(), ProductImageClickListener {
private fun showOrder(contractTerms: ContractTerms, totalFees: Amount?) {
orderView.text = contractTerms.summary
adapter.setItems(contractTerms.products)
+ if (contractTerms.products.size == 1) paymentManager.toggleDetailsShown()
val amount = contractTerms.amount
@SuppressLint("SetTextI18n")
totalView.text = "${amount.amount} ${amount.currency}"
@@ -154,7 +155,7 @@ class PromptPaymentFragment : Fragment(), ProductImageClickListener {
}
orderLabelView.fadeIn()
orderView.fadeIn()
- if (contractTerms.products.isNotEmpty()) detailsButton.fadeIn()
+ if (contractTerms.products.size > 1) detailsButton.fadeIn()
totalLabelView.fadeIn()
totalView.fadeIn()
}