From 66b4005b5ee832410742ee8ca3f07031dee38189 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Tue, 2 Feb 2021 13:31:22 +0100 Subject: Controllers: Export Starred or unread instead of and Fixes GH-1010 Signed-off-by: Sean Molenaar --- lib/Controller/ExportController.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib') 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 = []; -- cgit v1.2.3