Skip to content

Commit 937cfd6

Browse files
committed
IBX-9060: Fixed loadNotifications
1 parent b690b3a commit 937cfd6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/bundle/Controller/NotificationController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Ibexa\Bundle\AdminUi\Form\Type\SearchType;
1919
use Ibexa\Contracts\AdminUi\Controller\Controller;
2020
use Ibexa\Contracts\Core\Repository\NotificationService;
21+
use Ibexa\Contracts\Core\Repository\Values\Notification\Query\Criterion;
2122
use Ibexa\Contracts\Core\Repository\Values\Notification\Query\Criterion\NotificationQuery;
2223
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
2324
use Ibexa\Core\Notification\Renderer\Registry;
@@ -81,7 +82,9 @@ public function getNotificationsAction(Request $request, int $offset, int $limit
8182

8283
public function renderNotificationsPageAction(Request $request, int $page): Response
8384
{
84-
$allNotifications = $this->notificationService->loadNotifications(0, PHP_INT_MAX)->items;
85+
$allNotifications = $this->notificationService->loadNotifications(
86+
new NotificationQuery([], 0, PHP_INT_MAX)
87+
)->items;
8588

8689
$notificationTypes = array_unique(
8790
array_map(

src/lib/Pagination/Pagerfanta/NotificationAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function getNbResults(): int
5252
*/
5353
public function getSlice($offset, $length): NotificationList
5454
{
55-
$notifications = $this->notificationService->loadNotifications($offset, $length, $this->query);
55+
$notifications = $this->notificationService->loadNotifications($this->query);
5656

5757
$this->nbResults ??= $notifications->totalCount;
5858

0 commit comments

Comments
 (0)