mirror of
https://github.com/flarum/framework.git
synced 2024-11-26 02:10:09 +08:00
Update both unread and new notification count when a new notification appears
Related to flarum/core#500.
This commit is contained in:
parent
d5cc7494b0
commit
f5c9fd5d8d
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user