diff options
author | Marco Nassabain <marco.nassabain@hotmail.com> | 2021-01-26 18:00:33 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-08 22:31:21 +0200 |
commit | 27ca98136a98f273971712360435086b365b4957 (patch) | |
tree | eb434e80d21645d69e856d2a4158e6d248d8851c | |
parent | 785aaf6929412d4143c9f41d0ef60a820bff16a1 (diff) |
✨ ItemController: return sharedCount in index req
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
-rw-r--r-- | lib/Controller/ItemController.php | 12 |
1 files changed, 8 insertions, 4 deletions
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 []; } - + } |