mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
fix: stop nutzaps from rendering twice in the notification feed
NutzapEvent was missing from the textNoteCards exclusion filter in convertToCard, so every nutzap was both grouped into the MultiSetCard / NutzapUserSetCard path AND fell through to a standalone NoteCard, which renders kind 9321 as a big RenderNutzap card. The result was a duplicate: the same nutzap appeared once in the grouped card and once as an individual note — the way a reply would. LnZapEvent is already excluded for exactly this reason; nutzaps were simply overlooked when the nutzap grouping was added. Exclude NutzapEvent too so it only renders through the grouped path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X8ZruubvykNhfmrJXJA8s7
This commit is contained in:
+7
-1
@@ -358,7 +358,13 @@ class CardFeedContentState(
|
||||
it.event !is ReactionEvent &&
|
||||
it.event !is RepostEvent &&
|
||||
it.event !is GenericRepostEvent &&
|
||||
it.event !is LnZapEvent
|
||||
it.event !is LnZapEvent &&
|
||||
// Nutzaps are already grouped into nutzapsPerEvent (MultiSetCard)
|
||||
// or nutzapsPerUser (NutzapUserSetCard) above, exactly like lightning
|
||||
// zaps. Without this exclusion a nutzap would ALSO fall through to a
|
||||
// standalone NoteCard and render a second time as a big RenderNutzap
|
||||
// card — a duplicate of the grouped one.
|
||||
it.event !is NutzapEvent
|
||||
}.map {
|
||||
if (it.event is PrivateDmEvent || it.event is NIP17Group || it.isInMarmotGroup()) {
|
||||
MessageSetCard(it)
|
||||
|
||||
Reference in New Issue
Block a user