From 2ec54166f7f7870cc969dd856cab508dcd2c6f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 7 Nov 2017 13:39:13 -0500 Subject: [PATCH] only show alert if on the same category --- public/src/client/recent.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/src/client/recent.js b/public/src/client/recent.js index 398e8d11fb..55ae67500f 100644 --- a/public/src/client/recent.js +++ b/public/src/client/recent.js @@ -48,6 +48,10 @@ define('forum/recent', ['forum/infinitescroll', 'components'], function (infinit return; } + if (ajaxify.data.template.category && parseInt(ajaxify.data.cid, 10) !== parseInt(data.cid, 10)) { + return; + } + newTopicCount += 1; Recent.updateAlertText(); } @@ -74,6 +78,10 @@ define('forum/recent', ['forum/infinitescroll', 'components'], function (infinit return; } + if (ajaxify.data.template.category && parseInt(ajaxify.data.cid, 10) !== parseInt(post.topic.cid, 10)) { + return; + } + if (ajaxify.data.selectedFilter && ajaxify.data.selectedFilter.filter === 'watched') { socket.emit('topics.isFollowed', post.tid, function (err, isFollowed) { if (err) {