mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
Update both unread and new notification count when a new notification appears
Related to flarum/core#500.
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user