From 4333d217a1f4d9dc401305330e69833b28d98bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 18 Oct 2021 14:17:42 -0400 Subject: [PATCH] fix: #9917, show topics as unread for guests --- src/topics/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/topics/index.js b/src/topics/index.js index 85f9aefb49..85aa31aa2a 100644 --- a/src/topics/index.js +++ b/src/topics/index.js @@ -137,7 +137,7 @@ Topics.getTopicsByTids = async function (tids, options) { topic.teaser = result.teasers[i] || null; topic.isOwner = topic.uid === parseInt(uid, 10); topic.ignored = isIgnored[i]; - topic.unread = parseInt(uid, 10) > 0 && !hasRead[i] && !isIgnored[i]; + topic.unread = parseInt(uid, 10) <= 0 || (!hasRead[i] && !isIgnored[i]); topic.bookmark = sortNewToOld ? Math.max(1, topic.postcount + 2 - bookmarks[i]) : Math.min(topic.postcount, bookmarks[i] + 1);