]> Untitled Git - lemmy-ui.git/commitdiff
Adding live comment count.
authorDessalines <tyhou13@gmx.com>
Fri, 15 Jan 2021 17:42:05 +0000 (12:42 -0500)
committerDessalines <tyhou13@gmx.com>
Fri, 15 Jan 2021 17:42:05 +0000 (12:42 -0500)
src/shared/components/post.tsx

index 73d861ea0c1671db9384f99e972a29124a015fe2..2bbd7e86d7a2d32cd9a52f25b2f8c06c1b1ec55e 100644 (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
       if (data.recipient_ids.length == 0) {
         this.state.postRes.comments.unshift(data.comment_view);
+        this.state.postRes.post_view.counts.comments++;
         this.setState(this.state);
       }
     } else if (