[Improvement] resolve open comment menu and remove anti pattern editorStatus property from comment

This commit is contained in:
Qolzam
2018-02-23 21:57:05 +07:00
parent 014fa9ef3d
commit 2ce8da6ae2
13 changed files with 55 additions and 40 deletions

View File

@@ -317,7 +317,7 @@ export class CommentGroupComponent extends Component<ICommentGroupComponentProps
const showComments = ( comments && Object.keys(comments).length > 0
? (
<Paper elevation={0} style={open ? { display: 'block', padding: '0px 0px' } : { display: 'none', padding: '12px 16px' }}>
<CommentListComponent comments={comments!} isPostOwner={this.props.isPostOwner} disableComments={this.props.disableComments} />
<CommentListComponent comments={comments!} isPostOwner={this.props.isPostOwner} disableComments={this.props.disableComments} postId={postId}/>
</Paper>)
: '')
const loadComments = (( getCommentsRequest === undefined || (getCommentsRequest && getCommentsRequest!.status !== ServerRequestStatusType.OK)) ? <LinearProgress style={this.styles.progressbar} variant='indeterminate' /> : showComments)