diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 02c373f0a..bb34a1345 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -101,14 +101,14 @@ abstract class DashboardViewModelBase with Store { // value: () => transactionFilterStore.displayAll, // caption: S.current.all_transactions, // onChanged: transactionFilterStore.toggleAll), - FilterItem( - value: () => transactionFilterStore.displayIncoming, - caption: S.current.send, - onChanged: transactionFilterStore.toggleIncoming), FilterItem( value: () => transactionFilterStore.displayOutgoing, - caption: S.current.receive, + caption: S.current.send, onChanged: transactionFilterStore.toggleOutgoing), + FilterItem( + value: () => transactionFilterStore.displayIncoming, + caption: S.current.receive, + onChanged: transactionFilterStore.toggleIncoming), if (appStore.wallet!.type == WalletType.bitcoin) FilterItem( value: () => transactionFilterStore.displaySilentPayments, @@ -118,7 +118,7 @@ abstract class DashboardViewModelBase with Store { SwapFilterItem( enabledProviders: () => tradeFilterStore.enabledProviders, allEnabled: () => tradeFilterStore.displayAllTrades, - value: () => tradeFilterStore.displayAllTrades, + value: () => tradeFilterStore.enabledProviders>0, onChanged: () => tradeFilterStore.toggleDisplayExchange(ExchangeProviderDescription.all)), FilterItem( @@ -406,6 +406,11 @@ abstract class DashboardViewModelBase with Store { item.onChanged(); } } + for (final item in exchangeFilterItems) { + if (item.value() != value) { + item.onChanged(); + } + } } @action