From 27ca98136a98f273971712360435086b365b4957 Mon Sep 17 00:00:00 2001 From: Marco Nassabain Date: Tue, 26 Jan 2021 18:00:33 +0100 Subject: =?UTF-8?q?=E2=9C=A8=20ItemController:=20return=20sharedCount=20in?= =?UTF-8?q?=20index=20req?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marco Nassabain --- lib/Controller/ItemController.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/Controller') diff --git a/lib/Controller/ItemController.php b/lib/Controller/ItemController.php index 57ad318d2..b72311416 100644 --- a/lib/Controller/ItemController.php +++ b/lib/Controller/ItemController.php @@ -130,9 +130,13 @@ class ItemController extends Controller // we need to pass the newest feeds to not let the unread count get // out of sync if ($offset === 0) { - $return['newestItemId'] = $this->itemService->newest($this->getUserId())->getId(); - $return['feeds'] = $this->feedService->findAllForUser($this->getUserId()); - $return['starred'] = count($this->itemService->starred($this->getUserId())); + $params['newestItemId'] = + $this->itemService->getNewestItemId($this->userId); + $params['feeds'] = $this->feedService->findAllForUser($this->userId); + $params['starred'] = + $this->itemService->starredCount($this->userId); + $params['shared'] = + $this->itemService->sharedCount($this->userId); } switch ($type) { @@ -337,5 +341,5 @@ class ItemController extends Controller return []; } - + } -- cgit v1.2.3