fix: unread badge

- only increase unread badge if topic or category is watched
- fix logic for "there are new posts/topics" on /unread and /recent
This commit is contained in:
Barış Soner Uşaklı
2018-12-15 16:38:30 -05:00
parent d2c2d56f59
commit 9f5062682d
8 changed files with 81 additions and 73 deletions

View File

@@ -57,7 +57,7 @@ apiController.loadConfig = function (req, callback) {
config.requireEmailConfirmation = meta.config.requireEmailConfirmation === 1;
config.topicPostSort = meta.config.topicPostSort || 'oldest_to_newest';
config.categoryTopicSort = meta.config.categoryTopicSort || 'newest_to_oldest';
config.csrf_token = !req.isSpider() && req.csrfToken && req.csrfToken();
config.csrf_token = req.uid >= 0 && req.csrfToken && req.csrfToken();
config.searchEnabled = plugins.hasListeners('filter:search.query');
config.bootswatchSkin = meta.config.bootswatchSkin || '';
config.enablePostHistory = (meta.config.enablePostHistory || 1) === 1;