diff options
| author | Adam Soltys <[email protected]> | 2026-10-09 08:09:02 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-09 08:09:02 -0700 |
| commit | 4b0d0b3adb6941b88ba43eb0359cb221ae848235 (patch) | |
| tree | 118978a57fba73d46c0cd5fbb0ff64d71376bebe /src | |
| parent | fc1cf42a477d6a4f179cac5461373cbd52de7eb1 (diff) | |
| download | coinosv3-4b0d0b3adb6941b88ba43eb0359cb221ae848235.tar.gz coinosv3-4b0d0b3adb6941b88ba43eb0359cb221ae848235.zip | |
Notifications: a reply, mention or reaction your follows reported is left off the list and the unread count, as a muted one is — the thread folds that post behind who flagged it, so the tap landed on a fold instead of the reply it promised. Checked at render time, so reports that load later (or a report taken back) apply to what was kept
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MgAFLnkF7KrdhuyCLMNgtL
Diffstat (limited to 'src')
| -rw-r--r-- | src/features/messages.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/features/messages.js b/src/features/messages.js index 1fef866..8576c46 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -12856,7 +12856,11 @@ export function messagesFeature(ctx) { (ev) => { if (mergeNotifs([ev])) scheduleRepaint(); }); } function stopNotifWatch() { if (notifUnsub) { try { notifUnsub(); } catch {} notifUnsub = null; } } - const notifUnread = () => notifNow().items.filter((x) => x.ts > notifSeen() && !hiddenPk(x.actor)).length; + // Shown as a notification: not from someone hidden, and not something your + // follows flagged — the thread folds that post, so the tap would land on a + // fold instead of the reply it promised (or the author, flagged enough). + const notifShown = (x) => !hiddenPk(x.actor) && !reportsOn({ id: x.id, pubkey: x.actor }); + const notifUnread = () => notifNow().items.filter((x) => x.ts > notifSeen() && notifShown(x)).length; function markNotifsSeen() { const newest = Math.max(0, ...notifNow().items.map((x) => x.ts)); if (newest > notifSeen()) { const s2 = st(); s2.notifSeen = newest; save(s2); } @@ -12958,7 +12962,7 @@ export function messagesFeature(ctx) { function notifView() { const c = notifNow(); markNotifsSeen(); // anything that lands while you look is seen too - const items = c.items.filter((x) => !hiddenPk(x.actor)); // a mute made later applies to what was kept + const items = c.items.filter(notifShown); // a mute or report made later applies to what was kept const rows = items.flatMap((x, i) => [i ? noteSep() : null, notifRow(x)]); return h('div', { class: 'card col chat-page', style: 'gap:10px' }, h('div', { class: 'row gap6', style: 'align-items:center' }, |
