From 9482630efeca109987dbc457166a049eedbfe43a Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Fri, 6 Oct 2023 11:38:33 -0600 Subject: [wallet] Prevent user from interacting with non-contacted exchanges --- wallet/src/main/java/net/taler/wallet/exchanges/ExchangeAdapter.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'wallet/src/main/java/net/taler/wallet/exchanges') 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) } } -- cgit v1.2.3