'show all' resets default currency to create new offer

This commit is contained in:
woodser 2024-12-21 08:43:14 -05:00
parent 5444d96832
commit 42ede83ca2

View file

@ -260,7 +260,10 @@ abstract class OfferBookViewModel extends ActivatableViewModel {
showAllTradeCurrenciesProperty.set(showAllEntry); showAllTradeCurrenciesProperty.set(showAllEntry);
if (isEditEntry(code)) if (isEditEntry(code))
navigation.navigateTo(MainView.class, SettingsView.class, PreferencesView.class); navigation.navigateTo(MainView.class, SettingsView.class, PreferencesView.class);
else if (!showAllEntry) { else if (showAllEntry) {
this.selectedTradeCurrency = getDefaultTradeCurrency();
tradeCurrencyCode.set(selectedTradeCurrency.getCode());
} else {
this.selectedTradeCurrency = tradeCurrency; this.selectedTradeCurrency = tradeCurrency;
tradeCurrencyCode.set(code); tradeCurrencyCode.set(code);
} }