Skip to content

fix(notifications): show total zap count instead of 24h-only sats#269

Open
dmnyc wants to merge 1 commit into
mainfrom
fix/notification-zap-count
Open

fix(notifications): show total zap count instead of 24h-only sats#269
dmnyc wants to merge 1 commit into
mainfrom
fix/notification-zap-count

Conversation

@dmnyc

@dmnyc dmnyc commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The zap badge in the notifications summary bar was computing its count and sats total from only the last 24 hours, while the notification list itself has no time filter. Any zap older than 24h would appear as a visible row but contribute nothing to the badge, leaving it stuck at 0.
  • Additionally, the badge was displaying total sats (from bolt11 decoding) rather than a count. If bolt11 decoding failed for any receipt — for example because the invoice encodes no amount in the HRP — sats stayed 0 and the badge showed 0 even with visible zap rows.

Changes:

  • Remove the 24h cutoff from computeSummary24h() so the counts reflect every item in the buffer (matching what the list shows)
  • Change the zap badge label from sats to zapCount, consistent with how every other category (reactions, replies, reposts) is displayed

Test plan

  • Open Notifications tab — zap badge shows a non-zero count when zap rows are visible
  • Zaps older than 24h appear in the list and are included in the count
  • Tapping the ⚡ badge still filters the list to zaps only
  • Other category counts (reactions, replies, etc.) are unaffected

Zap badge was showing sats from only the last 24h, so any zap
older than that appeared in the list but counted as zero. Also,
bolt11 decode failures silently zeroed the sats figure even when
zap rows were visible.

- Remove 24h cutoff from computeSummary so counts match the list
- Badge now shows zapCount (consistent with every other category)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant