Rename Repository\Notify->NotifyOnDesktop to shouldShowOnDesktop
- New name better reflect the behavior
This commit is contained in:
parent
891f686dcf
commit
fa123bd765
|
@ -141,7 +141,7 @@ class Subscription
|
||||||
{
|
{
|
||||||
$type = NotificationFactory::getType($notification);
|
$type = NotificationFactory::getType($notification);
|
||||||
|
|
||||||
if (DI::notify()->NotifyOnDesktop($notification, $type)) {
|
if (DI::notify()->shouldShowOnDesktop($notification, $type)) {
|
||||||
DI::notify()->createFromNotification($notification);
|
DI::notify()->createFromNotification($notification);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -190,7 +190,7 @@ class Ping extends BaseModule
|
||||||
$owner = User::getOwnerDataById(DI::userSession()->getLocalUserId());
|
$owner = User::getOwnerDataById(DI::userSession()->getLocalUserId());
|
||||||
|
|
||||||
$navNotifications = array_map(function (Entity\Notification $notification) use ($owner) {
|
$navNotifications = array_map(function (Entity\Notification $notification) use ($owner) {
|
||||||
if (!DI::notify()->NotifyOnDesktop($notification)) {
|
if (!DI::notify()->shouldShowOnDesktop($notification)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (($notification->type == Post\UserNotification::TYPE_NONE) && in_array($owner['page-flags'], [User::PAGE_FLAGS_NORMAL, User::PAGE_FLAGS_PRVGROUP])) {
|
if (($notification->type == Post\UserNotification::TYPE_NONE) && in_array($owner['page-flags'], [User::PAGE_FLAGS_NORMAL, User::PAGE_FLAGS_PRVGROUP])) {
|
||||||
|
|
|
@ -664,7 +664,7 @@ class Notify extends BaseRepository
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function NotifyOnDesktop(Entity\Notification $Notification, string $type = null): bool
|
public function shouldShowOnDesktop(Entity\Notification $Notification, string $type = null): bool
|
||||||
{
|
{
|
||||||
if (is_null($type)) {
|
if (is_null($type)) {
|
||||||
$type = NotificationFactory::getType($Notification);
|
$type = NotificationFactory::getType($Notification);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user