From f5c9fd5d8d1475b85cdddcd7aee01c063c6820e9 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Tue, 29 Sep 2015 01:39:44 +0200 Subject: [PATCH] Update both unread and new notification count when a new notification appears Related to flarum/core#500. --- extensions/pusher/js/forum/src/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/pusher/js/forum/src/main.js b/extensions/pusher/js/forum/src/main.js index 4eea2a043..a20cdd5a8 100644 --- a/extensions/pusher/js/forum/src/main.js +++ b/extensions/pusher/js/forum/src/main.js @@ -138,7 +138,8 @@ app.initializers.add('pusher', () => { if (channels.user) { channels.user.bind('notification', () => { app.session.user.pushAttributes({ - unreadNotificationsCount: app.session.user.unreadNotificationsCount() + 1 + unreadNotificationsCount: app.session.user.unreadNotificationsCount() + 1, + newNotificationsCount: app.session.user.newNotificationsCount() + 1 }); delete app.cache.notifications; m.redraw();