diff --git a/eslint.config.js b/eslint.config.js index 5e5ff65e..fd8ed3c7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -27,6 +27,7 @@ export default ts.config( '@typescript-eslint/no-unsafe-function-type': 'warn', 'svelte/require-each-key': 'off', 'svelte/prefer-writable-derived': 'warn', + 'no-console': 'warn', }, }, { diff --git a/src/lib/components/lemmy/comment/Comment.svelte b/src/lib/components/lemmy/comment/Comment.svelte index fbc66b33..5f6ed4d9 100644 --- a/src/lib/components/lemmy/comment/Comment.svelte +++ b/src/lib/components/lemmy/comment/Comment.svelte @@ -38,11 +38,11 @@ actions = true, meta = true, replying = $bindable(false), + open = $bindable(), contentClass = '', class: clazz = '', metaSuffix, children, - open = $bindable(true), }: Props = $props() let editing = $state(false) @@ -74,16 +74,6 @@ editingLoad = false } - - $effect(() => { - if (!open) { - // const - } - }) - - setTimeout(() => { - open = true - }, 500) {#if editing} diff --git a/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte b/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte index 527a4fe6..8232fea5 100644 --- a/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte +++ b/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte @@ -42,7 +42,8 @@ {#if offsetEl} diff --git a/src/lib/components/lemmy/comment/Comments.svelte b/src/lib/components/lemmy/comment/Comments.svelte index 160f9e0a..a989b4f6 100644 --- a/src/lib/components/lemmy/comment/Comments.svelte +++ b/src/lib/components/lemmy/comment/Comments.svelte @@ -111,7 +111,7 @@ node.comment_view.counts.child_count > 0 ? 'border-l' : ''} ml-2.5 border-slate-200 dark:border-zinc-800 pl-2.5" - bind:open={() => node.expanded, value => (node.expanded = value)} + bind:open={nodes[index].expanded} > {#if node.children?.length > 0} diff --git a/src/lib/components/render/VirtualList.svelte b/src/lib/components/render/VirtualList.svelte index 72c41025..7148f850 100644 --- a/src/lib/components/render/VirtualList.svelte +++ b/src/lib/components/render/VirtualList.svelte @@ -1,8 +1,9 @@ - -