summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/components/post_view/components/post_list.jsx9
1 files changed, 2 insertions, 7 deletions
diff --git a/webapp/components/post_view/components/post_list.jsx b/webapp/components/post_view/components/post_list.jsx
index 685af045a..1142197c6 100644
--- a/webapp/components/post_view/components/post_list.jsx
+++ b/webapp/components/post_view/components/post_list.jsx
@@ -264,7 +264,6 @@ export default class PostList extends React.Component {
let commentCount = 0;
let isCommentMention = false;
- let lastCommentOnThreadTime = Number.MAX_SAFE_INTEGER;
let commentRootId;
if (parentPost) {
commentRootId = post.root_id;
@@ -275,18 +274,14 @@ export default class PostList extends React.Component {
for (const postId in posts) {
if (posts[postId].root_id === commentRootId) {
commentCount += 1;
- if (posts[postId].user_id === userId && (lastCommentOnThreadTime === Number.MAX_SAFE_INTEGER || lastCommentOnThreadTime < posts[postId].create_at)) {
- lastCommentOnThreadTime = posts[postId].create_at;
- }
}
}
if (parentPost && commentRootId) {
const commentsNotifyLevel = this.props.currentUser.notify_props.comments || 'never';
const notCurrentUser = post.user_id !== userId || (post.props && post.props.from_webhook);
- const notViewed = this.props.lastViewed !== 0 && post.create_at > this.props.lastViewed;
- if (notCurrentUser && notViewed) {
- if (commentsNotifyLevel === 'any' && (posts[commentRootId].user_id === userId || post.create_at > lastCommentOnThreadTime)) {
+ if (notCurrentUser) {
+ if (commentsNotifyLevel === 'any') {
isCommentMention = true;
} else if (commentsNotifyLevel === 'root' && posts[commentRootId].user_id === userId) {
isCommentMention = true;