mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
searched single base currency selection bugfix
This commit is contained in:
parent
84d75f6e8f
commit
7b74c415ac
1 changed files with 11 additions and 5 deletions
|
@ -31,7 +31,7 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
|
|||
final _searchFocusNode = FocusNode();
|
||||
|
||||
void onTap(int index) {
|
||||
if (index == 0 || current.isEmpty) {
|
||||
if (currenciesWithoutSelected[index] == current || current.isEmpty) {
|
||||
// ignore if already selected currency
|
||||
return;
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
|
|||
"currencySelect_${currenciesWithoutSelected[index]}"),
|
||||
child: RoundedContainer(
|
||||
padding: const EdgeInsets.all(0),
|
||||
color: index == 0
|
||||
color: currenciesWithoutSelected[index] == current
|
||||
? CFColors.selected
|
||||
: CFColors.white,
|
||||
child: RawMaterialButton(
|
||||
|
@ -238,7 +238,9 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
|
|||
materialTapTargetSize:
|
||||
MaterialTapTargetSize.shrinkWrap,
|
||||
value: true,
|
||||
groupValue: index == 0,
|
||||
groupValue: currenciesWithoutSelected[
|
||||
index] ==
|
||||
current,
|
||||
onChanged: (_) {
|
||||
onTap(index);
|
||||
},
|
||||
|
@ -253,7 +255,9 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
|
|||
children: [
|
||||
Text(
|
||||
currenciesWithoutSelected[index],
|
||||
key: (index == 0)
|
||||
key: (currenciesWithoutSelected[
|
||||
index] ==
|
||||
current)
|
||||
? const Key(
|
||||
"selectedCurrencySettingsCurrencyText")
|
||||
: null,
|
||||
|
@ -269,7 +273,9 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
|
|||
currenciesWithoutSelected[
|
||||
index]] ??
|
||||
"",
|
||||
key: (index == 0)
|
||||
key: (currenciesWithoutSelected[
|
||||
index] ==
|
||||
current)
|
||||
? const Key(
|
||||
"selectedCurrencySettingsCurrencyTextDescription")
|
||||
: null,
|
||||
|
|
Loading…
Reference in a new issue