Minor refactor
This commit is contained in:
parent
596ab42867
commit
e6213fa0f3
1 changed files with 2 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ import 'package:fires_flutter/models/fireNotification.dart';
|
|||
|
||||
final fireNotificationReducer = combineReducers<List<FireNotification>>([
|
||||
new TypedReducer<List<FireNotification>, AddedFireNotificationAction>(
|
||||
_receivedFireNotification),
|
||||
_addedFireNotification),
|
||||
new TypedReducer<List<FireNotification>, DeletedFireNotificationAction>(
|
||||
_deletedFireNotification),
|
||||
new TypedReducer<List<FireNotification>, DeletedAllFireNotificationAction>(
|
||||
|
|
@ -14,7 +14,7 @@ final fireNotificationReducer = combineReducers<List<FireNotification>>([
|
|||
_readedFireNotification)
|
||||
]);
|
||||
|
||||
List<FireNotification> _receivedFireNotification(
|
||||
List<FireNotification> _addedFireNotification(
|
||||
List<FireNotification> notifications, AddedFireNotificationAction action) {
|
||||
return new List.from(notifications)..insert(0, action.notif);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue