From cfd740de4317e9f9124bd2ba750769369eb03364 Mon Sep 17 00:00:00 2001 From: rays Date: Thu, 26 Nov 2026 16:57:56 -0500 Subject: [PATCH] All Subscriptions' footer counts what is in it (#499) The count under the list summed every feed's unread, feeds hidden from All Subscriptions (#288) included, and said 95 where the header and the list said 23. It uses unreadInAll, as the header does. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01RqkrVCCH8YcP2Y3i8VNYWA --- web/CHANGELOG.md | 1 + web/src/items.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web/CHANGELOG.md b/web/CHANGELOG.md index 6176be1..e95d559 100644 --- a/web/CHANGELOG.md +++ b/web/CHANGELOG.md @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- The count under All Subscriptions counts only its own unread items, not those of feeds hidden from it, so it agrees with the header (#499). - An item without a title is named in bold like the rest of the list, not in regular weight beside them (#498). - The X on a playlist's episode marks it played again; it did nothing (#497). - A folder's triangle in the feed list is back on the far left, in a narrower margin than before, with every feed's artwork still in line (#491). diff --git a/web/src/items.ts b/web/src/items.ts index ed2b06e..532f45b 100644 --- a/web/src/items.ts +++ b/web/src/items.ts @@ -146,7 +146,7 @@ function renderEntries(){ const f=S.feeds.find(x=>x.id===S.feed), v=VIEWS[S.feed ?? ''], sg=signalOf(S.feed); // An OPML's own row counts nothing: its shows do. const kids=f?S.feeds.filter(c=>c.group===f.id):[]; - const unread=kids.length?kids.reduce((n,x)=>n+x.unread,0):f?(seasonUnread(f.id)??f.unread):sg?sg.unread:S.feeds.reduce((n,x)=>n+(x.unread||0),0); + const unread=kids.length?kids.reduce((n,x)=>n+x.unread,0):f?(seasonUnread(f.id)??f.unread):sg?sg.unread:unreadInAll(); $('#count').textContent= `${f?(f.title||f.id):sg?sg.name:v?v.title:''}: ${S.total} item${S.total===1?'':'s'}, ${unread} unread`; const pane=$('#list'), top=pane?pane.scrollTop:0;