From 6289c726862c9d1356fb8d78694d1ef2d7527756 Mon Sep 17 00:00:00 2001 From: enahum Date: Fri, 4 Nov 2016 13:05:19 -0300 Subject: PLT-4189 always highlight reply mentions (#4443) --- webapp/components/post_view/components/post_list.jsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'webapp') 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; -- cgit v1.2.3-1-g7c22