From b5454b3b92123a6ea1af89300768c166c8adbaa7 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Wed, 26 Sep 2018 10:26:06 -0500 Subject: [PATCH] Persist "show all" state in currency selector in trade charts view --- .../desktop/main/market/trades/TradesChartsViewModel.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/desktop/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java b/desktop/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java index fd835a17b6..b3e3365ca2 100644 --- a/desktop/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java +++ b/desktop/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java @@ -129,7 +129,10 @@ class TradesChartsViewModel extends ActivatableViewModel { fillTradeCurrencies(); }; - Optional tradeCurrencyOptional = CurrencyUtil.getTradeCurrency(preferences.getTradeChartsScreenCurrencyCode()); + String tradeChartsScreenCurrencyCode = preferences.getTradeChartsScreenCurrencyCode(); + showAllTradeCurrenciesProperty.set(isShowAllEntry(tradeChartsScreenCurrencyCode)); + + Optional tradeCurrencyOptional = CurrencyUtil.getTradeCurrency(tradeChartsScreenCurrencyCode); if (tradeCurrencyOptional.isPresent()) selectedTradeCurrencyProperty.set(tradeCurrencyOptional.get()); else @@ -186,8 +189,8 @@ class TradesChartsViewModel extends ActivatableViewModel { showAllTradeCurrenciesProperty.set(showAllEntry); if (!showAllEntry) { selectedTradeCurrencyProperty.set(tradeCurrency); - preferences.setTradeChartsScreenCurrencyCode(code); } + preferences.setTradeChartsScreenCurrencyCode(code); updateChartData();