Added listener for update trade list in action list on dashboard screen

M committed Jan 10, 2020 at 22:28 UTC de70faca738eca20f1321a5ec3edb4edd7b41085
1 file changed +5 -1
lib/src/stores/action_list/action_list_store.dart
+5 -1
@@ -53,6 +53,9 @@ abstract class ActionListBase with Store {
53 .watch()
54 .listen((_) async => await _updateTransactionsList());
55
56 + _onTradesChanged =
57 + tradesSource.watch().listen((_) async => await updateTradeList());
58 +
59 updateTradeList();
60 }
61
@@ -145,6 +148,7 @@ abstract class ActionListBase with Store {
148 StreamSubscription<List<TransactionInfo>> _onTransactionsChangeSubscription;
149 StreamSubscription<Account> _onAccountChangeSubscription;
150 StreamSubscription<BoxEvent> _onTransactionDescriptions;
151 + StreamSubscription<BoxEvent> _onTradesChanged;
152
153 @override
154 void dispose() {
@@ -157,8 +161,8 @@ abstract class ActionListBase with Store {
161 }
162
163 _onTransactionDescriptions?.cancel();
160 -
164 _onWalletChangeSubscription.cancel();
165 + _onTradesChanged?.cancel();
166 super.dispose();
167 }
168