Minor refactor

This commit is contained in:
Vicente J. Ruiz Jurado 2018-08-03 08:43:23 +02:00
parent 596ab42867
commit e6213fa0f3

View file

@ -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);
}