diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2021-02-02 13:31:22 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-02-02 16:07:38 +0100 |
commit | 66b4005b5ee832410742ee8ca3f07031dee38189 (patch) | |
tree | 90888ecf4c26e714ce8f59318e5f32d7c5f90572 /lib/Controller | |
parent | f2b74a0ba1e762185b82e92379ce9e7366230c1e (diff) |
Controllers: Export Starred or unread instead of and
Fixes GH-1010
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'lib/Controller')
-rw-r--r-- | lib/Controller/ExportController.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Controller/ExportController.php b/lib/Controller/ExportController.php index ad1975639..959881888 100644 --- a/lib/Controller/ExportController.php +++ b/lib/Controller/ExportController.php @@ -22,6 +22,11 @@ use \OCP\IRequest; use \OCP\AppFramework\Http\JSONResponse; use OCP\IUserSession; +/** + * Class ExportController + * + * @package OCA\News\Controller + */ class ExportController extends Controller { @@ -69,7 +74,10 @@ class ExportController extends Controller public function articles(): JSONResponse { $feeds = $this->feedService->findAllForUser($this->getUserId()); - $items = $this->itemService->findAllForUser($this->getUserId(), ['unread' => true, 'starred' => true]); + $starred = $this->itemService->findAllForUser($this->getUserId(), ['unread' => false, 'starred' => true]); + $unread = $this->itemService->findAllForUser($this->getUserId(), ['unread' => true]); + + $items = array_merge($starred, $unread); // build assoc array for fast access $feedsDict = []; |