diff options
author | Cesar Enrique Garcia Dabo <enrique@engarda.org> | 2020-04-11 02:21:56 +0200 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2020-04-23 12:37:24 +0200 |
commit | 5b4f3d29e4800f12297092ba6b6813581de77169 (patch) | |
tree | 69a25e4c8d9468b91f7dd3f506532d6caca9555c /lib | |
parent | a69ec8edd84511dfd760b6911ded8fdeea8c5aaa (diff) |
Always show the unread articles.
The unread articles folder will always be visible, regardless
of the "Show all" setting. If that setting is on, then an
additional "All articles" folder will be show as before, but
it doesn't substitute the "Uread articles" one.
A new URL /apps/news/#/items/unread is also created that jumps
to the unread articles.
Signed-off-by: Cesar Enrique Garcia Dabo <cquike@arcor.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Db/FeedType.php | 1 | ||||
-rw-r--r-- | lib/Db/ItemMapper.php | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/Db/FeedType.php b/lib/Db/FeedType.php index 23adbefb3..bf487992c 100644 --- a/lib/Db/FeedType.php +++ b/lib/Db/FeedType.php @@ -21,4 +21,5 @@ class FeedType const SUBSCRIPTIONS = 3; const SHARED = 4; const EXPLORE = 5; + const UNREAD = 6; } diff --git a/lib/Db/ItemMapper.php b/lib/Db/ItemMapper.php index 82a38d67d..f0442aee9 100644 --- a/lib/Db/ItemMapper.php +++ b/lib/Db/ItemMapper.php @@ -64,7 +64,7 @@ class ItemMapper extends NewsMapper if (isset($type) && $type === FeedType::STARRED) { $sql = 'AND `items`.`starred` = '; $sql .= $this->db->quote(true, IQueryBuilder::PARAM_BOOL) . ' '; - } elseif (!$showAll) { + } elseif (!$showAll || $type === FeedType::UNREAD) { $sql .= 'AND `items`.`unread` = '; $sql .= $this->db->quote(true, IQueryBuilder::PARAM_BOOL) . ' '; } |