Fixed various issues with commenting on recently deleted posts
Этот коммит содержится в:
@@ -126,7 +126,7 @@ export default class PostInfo extends React.Component {
|
|||||||
lastCommentClass = ' comment-icon__container__show';
|
lastCommentClass = ' comment-icon__container__show';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.commentCount >= 1 && post.state !== Constants.POST_FAILED && post.state !== Constants.POST_LOADING) {
|
if (this.props.commentCount >= 1 && post.state !== Constants.POST_FAILED && post.state !== Constants.POST_LOADING && post.state !== Constants.POST_DELETED) {
|
||||||
comments = (
|
comments = (
|
||||||
<a
|
<a
|
||||||
href='#'
|
href='#'
|
||||||
|
|||||||
@@ -556,6 +556,11 @@ export default class PostList extends React.Component {
|
|||||||
var post = posts[order[i]];
|
var post = posts[order[i]];
|
||||||
var parentPost = posts[post.parent_id];
|
var parentPost = posts[post.parent_id];
|
||||||
|
|
||||||
|
// If the post is a comment whose parent has been deleted, don't add it to the list.
|
||||||
|
if (parentPost && parentPost.state === Constants.POST_DELETED) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var sameUser = false;
|
var sameUser = false;
|
||||||
var sameRoot = false;
|
var sameRoot = false;
|
||||||
var hideProfilePic = false;
|
var hideProfilePic = false;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user