mirror of
https://github.com/flarum/core.git
synced 2025-07-26 03:01:22 +02:00
Rename user.newNotificationsCount
This commit is contained in:
@@ -95,7 +95,7 @@ export default class Navigation extends Component {
|
||||
|
||||
return Button.component({
|
||||
className: 'Button Button--icon Navigation-drawer' +
|
||||
(user && user.newNotificationsCount() ? ' new' : ''),
|
||||
(user && user.newNotificationCount() ? ' new' : ''),
|
||||
onclick: e => {
|
||||
e.stopPropagation();
|
||||
drawer.show();
|
||||
|
@@ -23,7 +23,7 @@ Object.assign(User.prototype, {
|
||||
lastSeenAt: Model.attribute('lastSeenAt', Model.transformDate),
|
||||
markedAllAsReadAt: Model.attribute('markedAllAsReadAt', Model.transformDate),
|
||||
unreadNotificationCount: Model.attribute('unreadNotificationCount'),
|
||||
newNotificationsCount: Model.attribute('newNotificationsCount'),
|
||||
newNotificationCount: Model.attribute('newNotificationCount'),
|
||||
|
||||
discussionCount: Model.attribute('discussionCount'),
|
||||
commentCount: Model.attribute('commentCount'),
|
||||
|
@@ -137,7 +137,7 @@ export default class NotificationList extends Component {
|
||||
* been loaded.
|
||||
*/
|
||||
load() {
|
||||
if (app.session.user.newNotificationsCount()) {
|
||||
if (app.session.user.newNotificationCount()) {
|
||||
delete app.cache.notifications;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ export default class NotificationList extends Component {
|
||||
return;
|
||||
}
|
||||
|
||||
app.session.user.pushAttributes({newNotificationsCount: 0});
|
||||
app.session.user.pushAttributes({newNotificationCount: 0});
|
||||
|
||||
this.loadMore();
|
||||
}
|
||||
|
@@ -66,7 +66,7 @@ export default class NotificationsDropdown extends Dropdown {
|
||||
}
|
||||
|
||||
getNewCount() {
|
||||
return app.session.user.newNotificationsCount();
|
||||
return app.session.user.newNotificationCount();
|
||||
}
|
||||
|
||||
menuClick(e) {
|
||||
|
Reference in New Issue
Block a user