mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 06:55:08 +01:00
Fix currency not sorted when added back to ComboBox
When removing a previously selected fiat or crypto currency, it was adding it back to the bottom of the combobox rather than alphabetically. So make sure to sort when adding a currency to the list.
This commit is contained in:
parent
933b0b8277
commit
26d03afbb4
1 changed files with 6 additions and 2 deletions
|
@ -360,8 +360,10 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
||||||
new Popup<>().warning(Res.get("setting.preferences.cannotRemovePrefCurrency")).show();
|
new Popup<>().warning(Res.get("setting.preferences.cannotRemovePrefCurrency")).show();
|
||||||
} else {
|
} else {
|
||||||
preferences.removeFiatCurrency(item);
|
preferences.removeFiatCurrency(item);
|
||||||
if (!allFiatCurrencies.contains(item))
|
if (!allFiatCurrencies.contains(item)) {
|
||||||
allFiatCurrencies.add(item);
|
allFiatCurrencies.add(item);
|
||||||
|
allFiatCurrencies.sort(TradeCurrency::compareTo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setGraphic(pane);
|
setGraphic(pane);
|
||||||
|
@ -410,8 +412,10 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
||||||
new Popup<>().warning(Res.get("setting.preferences.cannotRemovePrefCurrency")).show();
|
new Popup<>().warning(Res.get("setting.preferences.cannotRemovePrefCurrency")).show();
|
||||||
} else {
|
} else {
|
||||||
preferences.removeCryptoCurrency(item);
|
preferences.removeCryptoCurrency(item);
|
||||||
if (!allCryptoCurrencies.contains(item))
|
if (!allCryptoCurrencies.contains(item)) {
|
||||||
allCryptoCurrencies.add(item);
|
allCryptoCurrencies.add(item);
|
||||||
|
allCryptoCurrencies.sort(TradeCurrency::compareTo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setGraphic(pane);
|
setGraphic(pane);
|
||||||
|
|
Loading…
Add table
Reference in a new issue