From 6312c24f2fe2a631e153f75acc0da91ec9e11ce2 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 28 May 2026 22:57:12 +0000 Subject: [PATCH] fix(nutzap): orange highlight on the lightning bolt for cashu zaps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reaction-row icon turns orange when the logged-in user has zapped a note. Phase 1 extended Note.isZappedBy to detect cashu zaps, but ObserveZapIconState had a fast-path gate that skipped the whole calculation when the note had no LN zap data: val hasZapData = zapsState?.note?.zapPayments?.isNotEmpty() == true || zapsState?.note?.zaps?.isNotEmpty() == true A cashu-only zap leaves both `zaps` and `zapPayments` empty, so hasZapData was false, wasZapped was hard-coded false, and the new isZappedBy logic never ran. The amount counter still updated because that path (Note.zapsAmount) was already extended in Phase 1 — only the icon gate was missing the third source. Add `nutzaps?.isNotEmpty()` to the gate. --- .../java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt index cb96356fd2..3aba7540d1 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt @@ -1457,7 +1457,8 @@ fun ObserveZapIconState( LaunchedEffect(key1 = zapsState, key2 = hasPendingPaymentRequest) { val hasZapData = zapsState?.note?.zapPayments?.isNotEmpty() == true || - zapsState?.note?.zaps?.isNotEmpty() == true + zapsState?.note?.zaps?.isNotEmpty() == true || + zapsState?.note?.nutzaps?.isNotEmpty() == true val wasZapped = if (hasZapData) { accountViewModel.calculateIfNoteWasZappedByAccount(baseNote, afterTimeInSeconds)