diff options
author | enahum <nahumhbl@gmail.com> | 2016-11-04 13:05:19 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-04 13:05:19 -0300 |
commit | 6289c726862c9d1356fb8d78694d1ef2d7527756 (patch) | |
tree | da35711d841b997c38394ff47fcfe34e92f09731 /webapp | |
parent | 1b5e21eaaa53ddc1f94139b01c94b7284dfb3ae1 (diff) | |
download | chat-6289c726862c9d1356fb8d78694d1ef2d7527756.tar.gz chat-6289c726862c9d1356fb8d78694d1ef2d7527756.tar.bz2 chat-6289c726862c9d1356fb8d78694d1ef2d7527756.zip |
PLT-4189 always highlight reply mentions (#4443)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/post_view/components/post_list.jsx | 9 |
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; |