fix(nutzap): orange highlight on the lightning bolt for cashu zaps

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.
This commit is contained in:
Claude
2026-05-28 22:57:12 +00:00
parent d174e054e0
commit 6312c24f2f
@@ -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)