summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSean Molenaar <sean@seanmolenaar.eu>2021-02-02 13:31:22 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-02-02 16:07:38 +0100
commit66b4005b5ee832410742ee8ca3f07031dee38189 (patch)
tree90888ecf4c26e714ce8f59318e5f32d7c5f90572 /lib
parentf2b74a0ba1e762185b82e92379ce9e7366230c1e (diff)
Controllers: Export Starred or unread instead of and
Fixes GH-1010 Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/ExportController.php10
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 = [];