this.handleCommentDownvote = this.handleCommentDownvote.bind(this);
}
- componentDidUpdate() {
- setupTippy();
+ componentDidUpdate(prevProps: CommentNodeProps) {
+ let prevComment = prevProps.node.comment;
+ let comment = this.props.node.comment;
+ if (
+ prevComment.saved !== comment.saved ||
+ prevComment.deleted !== comment.deleted ||
+ prevComment.read !== comment.read
+ ) {
+ setupTippy();
+ }
}
componentWillReceiveProps(nextProps: CommentNodeProps) {
dangerouslySetInnerHTML={mdToHtml(this.commentUnlessRemoved)}
/>
)}
- <ul class="list-inline mb-1 text-muted font-weight-bold h6">
+ <ul class="list-inline mb-1 text-muted font-weight-bold h5">
{this.props.markable && (
<li className="list-inline-item-action">
<span
handleShowAdvanced(i: CommentNode) {
i.state.showAdvanced = !i.state.showAdvanced;
i.setState(i.state);
+ setupTippy();
}
}
}
}
- componentDidUpdate() {
- setupTippy();
+ componentDidUpdate(prevProps: PostListingProps) {
+ let prevPost = prevProps.post;
+ let post = this.props.post;
+ if (
+ prevPost.saved !== post.saved ||
+ prevPost.deleted !== post.deleted ||
+ prevPost.locked !== post.locked ||
+ prevPost.stickied !== post.stickied
+ ) {
+ setupTippy();
+ }
}
componentWillReceiveProps(nextProps: PostListingProps) {
</>
)}
</ul>
- <ul class="list-inline mb-1 text-muted h6 font-weight-bold">
+ <ul class="list-inline mb-1 text-muted h5 font-weight-bold">
{UserService.Instance.user && (
<>
{this.props.showBody && (
handleShowAdvanced(i: PostListing) {
i.state.showAdvanced = !i.state.showAdvanced;
i.setState(i.state);
+ setupTippy();
}
}