mirror of
https://github.com/flarum/core.git
synced 2025-08-16 05:14:20 +02:00
Rename user.newNotificationsCount
This commit is contained in:
@@ -26,7 +26,7 @@ class CurrentUserSerializer extends UserSerializer
|
||||
'email' => $user->email,
|
||||
'markedAllAsReadAt' => $this->formatDate($user->marked_all_as_read_at),
|
||||
'unreadNotificationCount' => (int) $user->getUnreadNotificationCount(),
|
||||
'newNotificationsCount' => (int) $user->getNewNotificationsCount(),
|
||||
'newNotificationCount' => (int) $user->getNewNotificationCount(),
|
||||
'preferences' => (array) $user->preferences
|
||||
];
|
||||
|
||||
|
@@ -447,7 +447,7 @@ class User extends AbstractModel
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getNewNotificationsCount()
|
||||
public function getNewNotificationCount()
|
||||
{
|
||||
return $this->getUnreadNotifications()->filter(function ($notification) {
|
||||
return $notification->created_at > $this->read_notifications_at ?: 0;
|
||||
|
Reference in New Issue
Block a user