More work with fire notifications
This commit is contained in:
parent
5fdaf239c0
commit
9dd8a7de97
24 changed files with 512 additions and 288 deletions
|
|
@ -6,7 +6,16 @@ AppState appReducer(AppState state, action) {
|
|||
return state.copyWith(yourLocations: action.fetchedYourLocations);
|
||||
}
|
||||
if (action is FetchFireNotificationsSucceededAction) {
|
||||
return state.copyWith(fireNotifications: action.fetchedFireNotifications);
|
||||
return state.copyWith(fireNotifications: action.fetchedFireNotifications,
|
||||
fireNotificationsUnread: action.unreadCount);
|
||||
}
|
||||
if (action is AddedFireNotificationAction)
|
||||
return state.copyWith(
|
||||
fireNotificationsUnread: state.fireNotificationsUnread + 1);
|
||||
|
||||
if (action is ReadedFireNotificationAction)
|
||||
return state.copyWith(
|
||||
fireNotificationsUnread: state.fireNotificationsUnread - 1);
|
||||
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue