diff --git a/frontend/app/components/comment/comment.tsx b/frontend/app/components/comment/comment.tsx index cac52d67..2899d3e3 100644 --- a/frontend/app/components/comment/comment.tsx +++ b/frontend/app/components/comment/comment.tsx @@ -454,15 +454,12 @@ export class Comment extends Component { const o = { ...props.data, controversyText: `Controversy: ${(props.data.controversy || 0).toFixed(2)}`, - text: props.data.text.length - ? props.view === 'preview' + text: + props.view === 'preview' ? getTextSnippet(props.data.text) - : props.data.text - : this.props.isUserBanned - ? 'This user was blocked' - : props.data.delete - ? 'This comment was deleted' - : props.data.text, + : props.data.delete + ? 'This comment was deleted' + : props.data.text, time: formatTime(new Date(props.data.time)), orig: isEditing ? props.data.orig && @@ -587,7 +584,7 @@ export class Comment extends Component { )} - {isAdmin && props.isUserBanned && props.view !== 'user' && Blocked} + {props.isUserBanned && props.view !== 'user' && Blocked} {isAdmin && !props.isUserBanned && props.data.delete && Deleted} diff --git a/frontend/app/components/comment/connected-comment.ts b/frontend/app/components/comment/connected-comment.ts index 4e5dc89b..0fc6cae3 100644 --- a/frontend/app/components/comment/connected-comment.ts +++ b/frontend/app/components/comment/connected-comment.ts @@ -40,7 +40,7 @@ const mapStateToProps = (state: StoreState, cprops: { data: CommentType }) => { > = { editMode: getCommentMode(state, cprops.data.id), user: state.user, - isUserBanned: state.bannedUsers.find(u => u.id === cprops.data.user.id) !== undefined, + isUserBanned: cprops.data.user.block || state.bannedUsers.find(u => u.id === cprops.data.user.id) !== undefined, post_info: state.info, isCommentsDisabled: state.info.read_only || false, theme: state.theme,