Skip to content

Commit

Permalink
feat: set unread false for guests
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Oct 12, 2020
1 parent 411fa8b commit 7beaf49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/topics/index.js
Expand Up @@ -118,7 +118,7 @@ Topics.getTopicsByTids = async function (tids, options) {

topic.isOwner = topic.uid === parseInt(uid, 10);
topic.ignored = isIgnored[i];
topic.unread = !hasRead[i] && !isIgnored[i];
topic.unread = parseInt(uid, 10) > 0 && !hasRead[i] && !isIgnored[i];
topic.bookmark = sortOldToNew ?
Math.max(1, topic.postcount + 2 - bookmarks[i]) :
Math.min(topic.postcount, bookmarks[i] + 1);
Expand Down

0 comments on commit 7beaf49

Please sign in to comment.