summaryrefslogtreecommitdiffstats
path: root/webapp/components/post_view
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-11-08 11:59:27 -0300
committerHarrison Healey <harrisonmhealey@gmail.com>2016-11-08 09:59:27 -0500
commit376f7c6f0e06baeffc8642de1685abf2ced70aa3 (patch)
treec6109eed8df9b9f6df2d59be714caf04139500d4 /webapp/components/post_view
parent5fe2d782115ec6faf9ac743f5999a786126a3251 (diff)
downloadchat-376f7c6f0e06baeffc8642de1685abf2ced70aa3.tar.gz
chat-376f7c6f0e06baeffc8642de1685abf2ced70aa3.tar.bz2
chat-376f7c6f0e06baeffc8642de1685abf2ced70aa3.zip
PLT-4649 reply threads highlight (#4479)
Diffstat (limited to 'webapp/components/post_view')
-rw-r--r--webapp/components/post_view/components/post_list.jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/webapp/components/post_view/components/post_list.jsx b/webapp/components/post_view/components/post_list.jsx
index 1142197c6..400f516cc 100644
--- a/webapp/components/post_view/components/post_list.jsx
+++ b/webapp/components/post_view/components/post_list.jsx
@@ -264,6 +264,7 @@ export default class PostList extends React.Component {
let commentCount = 0;
let isCommentMention = false;
+ let shouldHighlightThreads = false;
let commentRootId;
if (parentPost) {
commentRootId = post.root_id;
@@ -274,6 +275,9 @@ 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) {
+ shouldHighlightThreads = true;
+ }
}
}
@@ -281,7 +285,7 @@ export default class PostList extends React.Component {
const commentsNotifyLevel = this.props.currentUser.notify_props.comments || 'never';
const notCurrentUser = post.user_id !== userId || (post.props && post.props.from_webhook);
if (notCurrentUser) {
- if (commentsNotifyLevel === 'any') {
+ if (commentsNotifyLevel === 'any' && (posts[commentRootId].user_id === userId || shouldHighlightThreads)) {
isCommentMention = true;
} else if (commentsNotifyLevel === 'root' && posts[commentRootId].user_id === userId) {
isCommentMention = true;