mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-07-22 07:48:27 +00:00
fix: keep event-less placeholder rooms when a deletion arrives
The additive feed path re-filters the existing list whenever an incoming batch contains a kind-5, dropping notes whose event has been deleted. Event-less notes fell into the else branch and returned false, so they were dropped too. An event-less row is a placeholder the filter synthesizes for a room with no message yet — a just-joined Concord channel, NIP-29 group, Marmot group or geohash cell. It carries no event, so it cannot have been deleted. Dropping it removed every such row from Messages the moment ANY unrelated deletion landed, and because this is the additive path the rows stayed gone until the next full rebuild. A community whose channels are all quiet looked like it had never loaded at all. Verified on device: surviving Concord placeholders in sort() went 0 -> 14, and a community that had been absent from Messages entirely now renders all of its channels. Not Concord-specific — the same placeholderNote() pattern backs NIP-29, Marmot and geohash rooms. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -161,7 +161,14 @@ class FeedContentState(
|
||||
if (noteEvent != null) {
|
||||
!cacheProvider.hasBeenDeleted(noteEvent)
|
||||
} else {
|
||||
false
|
||||
// An event-less row is a placeholder the filter synthesized for a room
|
||||
// that has no message yet — a just-joined Concord channel, NIP-29 group,
|
||||
// Marmot group or geohash cell. It carries no event, so it cannot have
|
||||
// been deleted, and dropping it here deleted every such row from the
|
||||
// Messages list the moment ANY kind-5 landed in an unrelated batch. The
|
||||
// row then stayed gone until the next full rebuild, which is why a quiet
|
||||
// community looked like it had never loaded at all.
|
||||
true
|
||||
}
|
||||
}.toImmutableList()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user