From 65a1740322cf126b2e8bd1df956ee8876dba0770 Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Fri, 28 Jul 2023 16:27:06 -0700 Subject: [PATCH] misc: fix Comment.svelte --- src/lib/components/lemmy/comment/Comment.svelte | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/components/lemmy/comment/Comment.svelte b/src/lib/components/lemmy/comment/Comment.svelte index 51d92660..8f501fa2 100644 --- a/src/lib/components/lemmy/comment/Comment.svelte +++ b/src/lib/components/lemmy/comment/Comment.svelte @@ -8,7 +8,7 @@ Plus, Trash, } from 'svelte-hero-icons' - import { insertCommentIntoTree, type CommentNodeI } from './comments' + import type { CommentNodeI } from './comments' import RelativeDate from '$lib/components/util/RelativeDate.svelte' import CommentForm from './CommentForm.svelte' import { page } from '$app/stores' @@ -163,11 +163,11 @@ {postId} parentId={node.comment_view.comment.id} on:comment={(e) => { - insertCommentIntoTree( - getContext('comments:tree'), - e.detail.comment_view, - false - ) + node.children.push({ + children: [], + comment_view: e.detail.comment_view, + depth: node.depth + 1, + }) replying = false }} />