This commit is contained in:
psychobunny
2014-05-28 17:43:03 -04:00
parent 1fecbd0b90
commit fee591e551
2 changed files with 12 additions and 7 deletions

View File

@@ -163,15 +163,17 @@ topicsController.get = function(req, res, next) {
}
if (uid) {
topics.markAsRead(tid, uid, function(err) {
topics.pushUnreadCount(uid);
topics.markTopicNotificationsRead(tid, uid);
});
if (!req.query.prefetched) {
topics.increaseViewCount(tid);
if (uid) {
topics.markAsRead(tid, uid, function(err) {
topics.pushUnreadCount(uid);
topics.markTopicNotificationsRead(tid, uid);
});
}
}
topics.increaseViewCount(tid);
// Paginator for noscript
data.pages = [];
for(var x=1; x<=data.pageCount; x++) {