diff options
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' }, |
