]> git.mxchange.org Git - friendica.git/commitdiff
Rename Repository\Notify->NotifyOnDesktop to shouldShowOnDesktop
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 3 Nov 2022 00:28:53 +0000 (20:28 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 4 Nov 2022 10:42:37 +0000 (06:42 -0400)
- New name better reflect the behavior

src/Model/Subscription.php
src/Module/Notifications/Ping.php
src/Navigation/Notifications/Repository/Notify.php

index 2796b37a0fe50a897059109ed60390773ad53daf..88aa820674007a73eedb3228c8ef5e412b0edc25 100644 (file)
@@ -141,7 +141,7 @@ class Subscription
        {
                $type = NotificationFactory::getType($notification);
 
-               if (DI::notify()->NotifyOnDesktop($notification, $type)) {
+               if (DI::notify()->shouldShowOnDesktop($notification, $type)) {
                        DI::notify()->createFromNotification($notification);
                }
 
index a0fe8e9aee13a33c210ff8fe96420ef35211fcbe..3838c0e15eb707603f4fa0f1120c80d4e21d12f4 100644 (file)
@@ -190,7 +190,7 @@ class Ping extends BaseModule
                        $owner = User::getOwnerDataById(DI::userSession()->getLocalUserId());
 
                        $navNotifications = array_map(function (Entity\Notification $notification) use ($owner) {
-                               if (!DI::notify()->NotifyOnDesktop($notification)) {
+                               if (!DI::notify()->shouldShowOnDesktop($notification)) {
                                        return null;
                                }
                                if (($notification->type == Post\UserNotification::TYPE_NONE) && in_array($owner['page-flags'], [User::PAGE_FLAGS_NORMAL, User::PAGE_FLAGS_PRVGROUP])) {
index 5ed62c8c3b190588d5da69cde2f04e3fe1262908..52c51fcb8ebdf3f7f6217ae67e85d5f2ffd68d4c 100644 (file)
@@ -664,7 +664,7 @@ class Notify extends BaseRepository
                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)) {
                        $type = NotificationFactory::getType($Notification);