From 0b50a90efb8ac84a32cb78dbed0c4cd5bb546164 Mon Sep 17 00:00:00 2001 From: "Vicente J. Ruiz Jurado" Date: Fri, 3 Aug 2018 09:08:03 +0200 Subject: [PATCH] Set to 0 unread fire notifications on delete --- lib/redux/appReducer.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/redux/appReducer.dart b/lib/redux/appReducer.dart index 8a4ec42..717eab0 100644 --- a/lib/redux/appReducer.dart +++ b/lib/redux/appReducer.dart @@ -17,5 +17,9 @@ AppState appReducer(AppState state, action) { return state.copyWith( fireNotificationsUnread: state.fireNotificationsUnread - 1); + if (action is DeleteAllFireNotificationAction) + return state.copyWith( + fireNotificationsUnread: 0); + return state; }