From 91883da4abe24131467a02e699d12e433caadc1d Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 25 Jun 2026 22:29:58 +0000 Subject: [PATCH] fix: stop nutzaps from rendering twice in the notification feed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01X8ZruubvykNhfmrJXJA8s7 --- .../screen/loggedIn/notifications/CardFeedContentState.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/notifications/CardFeedContentState.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/notifications/CardFeedContentState.kt index 391bb761f2..39caaba460 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/notifications/CardFeedContentState.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/notifications/CardFeedContentState.kt @@ -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)