From 756dfd8ae68b72ece192e3e6b7a27f33eb496677 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Sat, 9 Mar 2019 11:16:36 -0500 Subject: [PATCH] fix: #7008 --- src/controllers/recent.js | 6 +++++- src/controllers/unread.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/controllers/recent.js b/src/controllers/recent.js index 2b58bd9b99..ed7f8e5ea4 100644 --- a/src/controllers/recent.js +++ b/src/controllers/recent.js @@ -51,7 +51,11 @@ recentController.getData = function (req, url, sort, callback) { user.getSettings(req.uid, next); }, categories: function (next) { - helpers.getCategoriesByStates(req.uid, cid, [categories.watchStates.watching, categories.watchStates.notwatching], next); + const states = [categories.watchStates.watching, categories.watchStates.notwatching]; + if (filter === 'watched') { + states.push(categories.watchStates.ignoring); + } + helpers.getCategoriesByStates(req.uid, cid, states, next); }, rssToken: function (next) { user.auth.getFeedToken(req.uid, next); diff --git a/src/controllers/unread.js b/src/controllers/unread.js index c1f9804437..faafc50b83 100644 --- a/src/controllers/unread.js +++ b/src/controllers/unread.js @@ -36,7 +36,11 @@ unreadController.get = function (req, res, next) { if (plugins.hasListeners('filter:unread.categories')) { plugins.fireHook('filter:unread.categories', { uid: req.uid, cid: cid }, next); } else { - helpers.getCategoriesByStates(req.uid, cid, [categories.watchStates.watching], next); + const states = [categories.watchStates.watching]; + if (filter === 'watched') { + states.push(categories.watchStates.notwatching, categories.watchStates.ignoring); + } + helpers.getCategoriesByStates(req.uid, cid, states, next); } }, settings: function (next) {