Switch data source from notify to notification in Module\Notifications\Ping
- Change unused FormattedNotification classes to FormattedNavNotification classes
This commit is contained in:
@@ -47,4 +47,11 @@ class Notifications extends BaseCollection
|
||||
$Notification->setDismissed();
|
||||
});
|
||||
}
|
||||
|
||||
public function countUnseen(): int
|
||||
{
|
||||
return array_reduce($this->getArrayCopy(), function (int $carry, Entity\Notification $Notification) {
|
||||
return $carry + ($Notification->seen ? 0 : 1);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user