mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 14:42:37 +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();
|
||||
} else {
|
||||
preferences.removeFiatCurrency(item);
|
||||
if (!allFiatCurrencies.contains(item))
|
||||
if (!allFiatCurrencies.contains(item)) {
|
||||
allFiatCurrencies.add(item);
|
||||
allFiatCurrencies.sort(TradeCurrency::compareTo);
|
||||
}
|
||||
}
|
||||
});
|
||||
setGraphic(pane);
|
||||
|
@ -410,8 +412,10 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
|||
new Popup<>().warning(Res.get("setting.preferences.cannotRemovePrefCurrency")).show();
|
||||
} else {
|
||||
preferences.removeCryptoCurrency(item);
|
||||
if (!allCryptoCurrencies.contains(item))
|
||||
if (!allCryptoCurrencies.contains(item)) {
|
||||
allCryptoCurrencies.add(item);
|
||||
allCryptoCurrencies.sort(TradeCurrency::compareTo);
|
||||
}
|
||||
}
|
||||
});
|
||||
setGraphic(pane);
|
||||
|
|
Loading…
Add table
Reference in a new issue