From e46422c27baa40081ccef8012658ff8caa832b12 Mon Sep 17 00:00:00 2001 From: James Xylight Date: Mon, 3 Feb 2025 20:28:44 -0800 Subject: [PATCH] fix: save comment expand state --- src/lib/components/lemmy/comment/Comment.svelte | 9 ++++----- src/lib/components/lemmy/comment/comments.svelte.ts | 4 +++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/components/lemmy/comment/Comment.svelte b/src/lib/components/lemmy/comment/Comment.svelte index 0c075cab..bcb186b1 100644 --- a/src/lib/components/lemmy/comment/Comment.svelte +++ b/src/lib/components/lemmy/comment/Comment.svelte @@ -52,7 +52,6 @@ op = false, actions = true, meta = true, - open = $bindable(true), replying = $bindable(false), contentClass = '', class: clazz = '', @@ -137,7 +136,7 @@ > {#if meta} {/if} - {#if open} + {#if node.expanded}
depth: number loading?: boolean + expanded?: boolean } function getCommentParentId(comment?: Comment): number | undefined { @@ -36,7 +37,8 @@ export function buildCommentsTree( const node: CommentNodeI = { comment_view, children: [], - depth: depth + depth: depth, + expanded: true } min_depth = Math.min(min_depth, depth) if (filter(comment_view)) {