From 60004f03a72f9e964af54f534a93c62dfb9ba90f Mon Sep 17 00:00:00 2001 From: Xylight Date: Sun, 1 Sep 2024 14:19:17 -0700 Subject: [PATCH] fix: set open to true on commentnodei --- src/lib/components/lemmy/comment/Comment.svelte | 4 +++- src/lib/components/lemmy/comment/comments.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/components/lemmy/comment/Comment.svelte b/src/lib/components/lemmy/comment/Comment.svelte index 6df2f167..34dc691c 100644 --- a/src/lib/components/lemmy/comment/Comment.svelte +++ b/src/lib/components/lemmy/comment/Comment.svelte @@ -129,7 +129,9 @@ src={open ? Minus : Plus} size="16" micro - class="transition-transform duration-500 {open ? '' : 'rotate-90'}" + class="transition-transform duration-500 {open + ? '' + : 'rotate-90'} text-primary-900 dark:text-primary-100" /> diff --git a/src/lib/components/lemmy/comment/comments.ts b/src/lib/components/lemmy/comment/comments.ts index fc2df6c3..58c9fe9f 100644 --- a/src/lib/components/lemmy/comment/comments.ts +++ b/src/lib/components/lemmy/comment/comments.ts @@ -41,7 +41,9 @@ export function buildCommentsTree( comment_view, children: [], depth: depth, - ui: {}, + ui: { + open: true, + }, } min_depth = Math.min(min_depth, depth) if (filter(comment_view)) {