[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-android] 02/04: [wallet] Prevent user from interacting with
From: |
gnunet |
Subject: |
[taler-taler-android] 02/04: [wallet] Prevent user from interacting with non-contacted exchanges |
Date: |
Tue, 10 Oct 2023 18:32:51 +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 9482630efeca109987dbc457166a049eedbfe43a
Author: Iván Ávalos <avalos@disroot.org>
AuthorDate: Fri Oct 6 11:38:33 2023 -0600
[wallet] Prevent user from interacting with non-contacted exchanges
---
wallet/src/main/java/net/taler/wallet/exchanges/ExchangeAdapter.kt | 6 ++++--
wallet/src/main/res/values/strings.xml | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/wallet/src/main/java/net/taler/wallet/exchanges/ExchangeAdapter.kt
b/wallet/src/main/java/net/taler/wallet/exchanges/ExchangeAdapter.kt
index e0cf5be..6ff97d6 100644
--- a/wallet/src/main/java/net/taler/wallet/exchanges/ExchangeAdapter.kt
+++ b/wallet/src/main/java/net/taler/wallet/exchanges/ExchangeAdapter.kt
@@ -80,8 +80,9 @@ internal class ExchangeAdapter(
fun bind(item: ExchangeItem) {
urlView.text = item.name
+ // If currency is null, it's because we have no data from the
exchange...
currencyView.text = if (item.currency == null) {
- context.getString(R.string.settings_version_unknown)
+ context.getString(R.string.exchange_not_contacted)
} else {
context.getString(R.string.exchange_list_currency,
item.currency)
}
@@ -91,7 +92,8 @@ internal class ExchangeAdapter(
} else {
itemView.setOnClickListener(null)
itemView.isClickable = false
- overflowIcon.visibility = VISIBLE
+ // ...thus, we should prevent the user from interacting with
it.
+ overflowIcon.visibility = if (item.currency != null) VISIBLE
else GONE
}
overflowIcon.setOnClickListener { openMenu(overflowIcon, item) }
}
diff --git a/wallet/src/main/res/values/strings.xml
b/wallet/src/main/res/values/strings.xml
index b35a875..79b808c 100644
--- a/wallet/src/main/res/values/strings.xml
+++ b/wallet/src/main/res/values/strings.xml
@@ -220,6 +220,7 @@ GNU Taler is immune against many types of fraud, such as
phishing of credit card
<string name="exchange_list_empty">No exchanges known\n\nAdd one manually
or withdraw digital cash!</string>
<string name="exchange_list_currency">Currency: %s</string>
<string name="exchange_list_add">Add exchange</string>
+ <string name="exchange_not_contacted">Exchange not contacted</string>
<string name="exchange_add_url">Enter address of exchange</string>
<string name="exchange_add_error">Could not add exchange</string>
<string name="exchange_list_error">Could not list exchanges</string>
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.