Added Monitorized Areas

This commit is contained in:
Vicente J. Ruiz Jurado 2018-08-06 10:34:32 +02:00
parent 864ee28584
commit e50ff5179b
16 changed files with 223 additions and 19 deletions

View file

@ -214,6 +214,13 @@ void fetchDataMiddleware(Store<AppState> store, action, NextDispatcher next) {
});
}
if (action is FetchMonitoredAreasAction) {
api.getMonitoredAreas(state: store.state).then((result) { // store.dispatch()
store.dispatch(
new FetchMonitoredAreasSucceededAction(result));
});
}
// Make sure our actions continue on to the reducer.
next(action);
}
@ -243,5 +250,6 @@ void createUser(store, lang, token) {
store.dispatch(new OnUserCreatedAction(userId));
store.dispatch(new FetchYourLocationsAction());
store.dispatch(new FetchFireNotificationsAction());
store.dispatch(new FetchMonitoredAreasAction());
});
}