mirror of
https://github.com/flarum/core.git
synced 2025-10-16 01:07:09 +02:00
Rename user.unreadNotificationsCount
This commit is contained in:
@@ -79,7 +79,7 @@ export default class Notification extends Component {
|
||||
markAsRead() {
|
||||
if (this.props.notification.isRead()) return;
|
||||
|
||||
app.session.user.pushAttributes({unreadNotificationsCount: app.session.user.unreadNotificationsCount() - 1});
|
||||
app.session.user.pushAttributes({unreadNotificationCount: app.session.user.unreadNotificationCount() - 1});
|
||||
|
||||
this.props.notification.save({isRead: true});
|
||||
}
|
||||
|
@@ -191,7 +191,7 @@ export default class NotificationList extends Component {
|
||||
markAllAsRead() {
|
||||
if (!app.cache.notifications) return;
|
||||
|
||||
app.session.user.pushAttributes({unreadNotificationsCount: 0});
|
||||
app.session.user.pushAttributes({unreadNotificationCount: 0});
|
||||
|
||||
app.cache.notifications.forEach(notifications => {
|
||||
notifications.forEach(notification => notification.pushAttributes({isRead: true}))
|
||||
|
@@ -62,7 +62,7 @@ export default class NotificationsDropdown extends Dropdown {
|
||||
}
|
||||
|
||||
getUnreadCount() {
|
||||
return app.session.user.unreadNotificationsCount();
|
||||
return app.session.user.unreadNotificationCount();
|
||||
}
|
||||
|
||||
getNewCount() {
|
||||
|
Reference in New Issue
Block a user