Update both unread and new notification count when a new notification appears

Related to flarum/core#500.
This commit is contained in:
Franz Liedke 2015-09-29 01:39:44 +02:00
parent d5cc7494b0
commit f5c9fd5d8d

View File

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