From dd30acf19d4ba770aa624465ab310c40d05740bb Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Wed, 5 Jul 2023 14:36:17 -0700 Subject: [PATCH] feat: Fix commenting issue --- src/lib/components/lemmy/comment/Comment.svelte | 9 ++++++++- src/lib/components/lemmy/comment/CommentForm.svelte | 5 +++-- src/routes/login/+page.svelte | 2 +- src/routes/post/[instance]/[id]/+page.svelte | 5 ++++- src/routes/u/[name]/+page.svelte | 1 - 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/lib/components/lemmy/comment/Comment.svelte b/src/lib/components/lemmy/comment/Comment.svelte index 20307471..e3e9fc4b 100644 --- a/src/lib/components/lemmy/comment/Comment.svelte +++ b/src/lib/components/lemmy/comment/Comment.svelte @@ -159,7 +159,14 @@ {postId} parentId={node.comment_view.comment.id} on:comment={(e) => { - node.children = [e.detail, ...node.children] + node.children = [ + { + children: [], + depth: node.depth, + comment_view: e.detail.comment_view, + }, + ...node.children, + ] replying = false }} /> diff --git a/src/lib/components/lemmy/comment/CommentForm.svelte b/src/lib/components/lemmy/comment/CommentForm.svelte index 676dd591..f6fa919d 100644 --- a/src/lib/components/lemmy/comment/CommentForm.svelte +++ b/src/lib/components/lemmy/comment/CommentForm.svelte @@ -1,7 +1,7 @@