mirror of
https://github.com/flarum/framework.git
synced 2025-06-20 09:20:30 +08:00
Return both unread and new notification count from the API
Related to #500.
This commit is contained in:
@ -70,13 +70,11 @@ export default class NotificationsDropdown extends Dropdown {
|
||||
}
|
||||
|
||||
getUnreadCount() {
|
||||
return app.cache.notifications ?
|
||||
app.cache.notifications.filter(notification => !notification.isRead()).length :
|
||||
0;
|
||||
return app.session.user.unreadNotificationsCount();
|
||||
}
|
||||
|
||||
getNewCount() {
|
||||
return app.session.user.unreadNotificationsCount();
|
||||
return app.session.user.newNotificationsCount();
|
||||
}
|
||||
|
||||
menuClick(e) {
|
||||
|
Reference in New Issue
Block a user