mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-4649 reply threads highlight (#4479)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user