From 4e90a4e79552b2d4a3c8219c7889b83db9b59f72 Mon Sep 17 00:00:00 2001 From: padreug Date: Sat, 20 Sep 2025 18:07:03 +0200 Subject: [PATCH] Update visibility logic in ThreadedPost component - Refined the visibility logic to ensure a post is only hidden if its parent is collapsed, rather than if it is collapsed itself. This change enhances the clarity of post visibility in threaded discussions. - Adjusted the parent-collapsed prop to reflect the current collapse state, improving the interaction and user experience within the NostrFeed module. --- src/modules/nostr-feed/components/ThreadedPost.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/nostr-feed/components/ThreadedPost.vue b/src/modules/nostr-feed/components/ThreadedPost.vue index fccfdc3..53d5fa4 100644 --- a/src/modules/nostr-feed/components/ThreadedPost.vue +++ b/src/modules/nostr-feed/components/ThreadedPost.vue @@ -41,7 +41,8 @@ const isCollapsed = computed(() => props.collapsedPosts?.has(props.post.id) || f const hasLimitedReplies = computed(() => props.limitedReplyPosts?.has(props.post.id) || false) // Check if this post should be visible (not hidden by parent collapse) -const isVisible = computed(() => !props.parentCollapsed && !isCollapsed.value) +// Note: A post is only hidden if its PARENT is collapsed, not if IT is collapsed +const isVisible = computed(() => !props.parentCollapsed) // Check if this is an admin post const isAdminPost = computed(() => props.adminPubkeys.includes(props.post.pubkey)) @@ -252,7 +253,7 @@ function getRideshareType(post: FeedPost): string { :get-display-name="getDisplayName" :get-event-reactions="getEventReactions" :depth="depth + 1" - :parent-collapsed="false" + :parent-collapsed="isCollapsed" :collapsed-posts="collapsedPosts" :limited-reply-posts="limitedReplyPosts" @reply-to-note="$emit('reply-to-note', $event)"