mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
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:
@@ -161,7 +161,7 @@ topicsController.get = function (req, res, callback) {
|
||||
res.locals.linkTags.push(rel);
|
||||
});
|
||||
|
||||
if (!req.isSpider()) {
|
||||
if (req.uid >= 0) {
|
||||
req.session.tids_viewed = req.session.tids_viewed || {};
|
||||
if (!req.session.tids_viewed[tid] || req.session.tids_viewed[tid] < Date.now() - 3600000) {
|
||||
topics.increaseViewCount(tid);
|
||||
|
||||
Reference in New Issue
Block a user