Comments explaining why we have inactive comments in the stream

This commit is contained in:
Chi Vinh Le
2017-07-31 20:17:06 +07:00
parent fc3acecf61
commit 97c75be604
2 changed files with 5 additions and 0 deletions
@@ -317,7 +317,10 @@ export default class Comment extends React.Component {
} = this.props;
const view = this.getVisibileReplies();
// Inactive comments can be viewed by moderators and admins (e.g. using permalinks).
const isActive = isCommentActive(comment.status);
const {loadingState} = this.state;
const isPending = comment.id.indexOf('pending') >= 0;
const isHighlighted = highlighted === comment.id;
@@ -106,6 +106,8 @@ class Stream extends React.Component {
// even though the permalinked comment is the highlighted one, we're displaying its parent + replies
let highlightedComment = comment && getTopLevelParent(comment);
if (highlightedComment) {
// Inactive comments can be viewed by moderators and admins (e.g. using permalinks).
const isInactive = !isCommentActive(comment.status);
if (comment.parent && isInactive) {