fix(thread): render blocked-note placeholder and continue subtree walk#388
Merged
Conversation
A blocked note in the nested-reply tree was silently dropped along with its entire subtree, hiding the user's own replies if they were parented to the blocked note. Mirrors the WoT-hidden behaviour: render the blocked placeholder row and continue the DFS walk into children.
Collaborator
Author
|
Follow-on to #380 — that PR introduced the WoT-hidden placeholder pattern; this applies the same walk-and-continue logic to blocked notes, which were previously dropped silently along with their subtrees. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root cause
```swift
// Before — entire subtree silently dropped
if blockedEventIds.contains(kid.id) { continue }
// After — placeholder rendered, walk continues
if blockedEventIds.contains(kid.id) {
result.append(NestedReplyRow(row: makeRow(kid), depth: depth))
walk(parentId: kid.id, depth: depth + 1)
continue
}
```
The direct-reply list already kept blocked rows (`if row.isBlocked { visible.append(row) }`); nested replies now follow the same rule.
Before / After
Test
Open a thread where a blocked user has a reply and you have a reply to that blocked note — your reply should now appear beneath the "Post from blocked user" placeholder instead of being hidden.