PLT-4189 always highlight reply mentions (#4443)
Этот коммит содержится в:
@@ -264,7 +264,6 @@ export default class PostList extends React.Component {
|
|||||||
|
|
||||||
let commentCount = 0;
|
let commentCount = 0;
|
||||||
let isCommentMention = false;
|
let isCommentMention = false;
|
||||||
let lastCommentOnThreadTime = Number.MAX_SAFE_INTEGER;
|
|
||||||
let commentRootId;
|
let commentRootId;
|
||||||
if (parentPost) {
|
if (parentPost) {
|
||||||
commentRootId = post.root_id;
|
commentRootId = post.root_id;
|
||||||
@@ -275,18 +274,14 @@ export default class PostList extends React.Component {
|
|||||||
for (const postId in posts) {
|
for (const postId in posts) {
|
||||||
if (posts[postId].root_id === commentRootId) {
|
if (posts[postId].root_id === commentRootId) {
|
||||||
commentCount += 1;
|
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) {
|
if (parentPost && commentRootId) {
|
||||||
const commentsNotifyLevel = this.props.currentUser.notify_props.comments || 'never';
|
const commentsNotifyLevel = this.props.currentUser.notify_props.comments || 'never';
|
||||||
const notCurrentUser = post.user_id !== userId || (post.props && post.props.from_webhook);
|
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) {
|
||||||
if (notCurrentUser && notViewed) {
|
if (commentsNotifyLevel === 'any') {
|
||||||
if (commentsNotifyLevel === 'any' && (posts[commentRootId].user_id === userId || post.create_at > lastCommentOnThreadTime)) {
|
|
||||||
isCommentMention = true;
|
isCommentMention = true;
|
||||||
} else if (commentsNotifyLevel === 'root' && posts[commentRootId].user_id === userId) {
|
} else if (commentsNotifyLevel === 'root' && posts[commentRootId].user_id === userId) {
|
||||||
isCommentMention = true;
|
isCommentMention = true;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user