Adding live comment count.

This commit is contained in:
Dessalines 2021-01-15 12:42:05 -05:00
parent 93f30fa915
commit aeff5d2190

View file

@ -483,6 +483,7 @@ export class Post extends Component<any, PostState> {
// Necessary since it might be a user reply, which has the recipients, to avoid double // Necessary since it might be a user reply, which has the recipients, to avoid double
if (data.recipient_ids.length == 0) { if (data.recipient_ids.length == 0) {
this.state.postRes.comments.unshift(data.comment_view); this.state.postRes.comments.unshift(data.comment_view);
this.state.postRes.post_view.counts.comments++;
this.setState(this.state); this.setState(this.state);
} }
} else if ( } else if (