Mark all read on an OPML subscription

Marking the subscription read did nothing: its own row holds no entries.
read-all now resolves the feeds grouped under the id -- via
subscriptions(), so a child promoted to config is included -- and marks
those. Button sits before Unsubscribe, where every other feed keeps it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AdXho5tTkjFLeUXKbEjKBh
This commit is contained in:
2026-09-10 18:45:46 +00:00
parent 8f5e2749ff
commit 7473d5b7fb
5 changed files with 46 additions and 4 deletions

View File

@@ -556,6 +556,7 @@ function renderGroup(f,kids){
<div class="acts">
<button class="btn primary" data-a="scan">Re-read OPML</button>
<button class="btn" data-a="settings">Settings</button>
<button class="btn" data-a="read">Mark all read</button>
<button class="btn danger" data-a="rm">Unsubscribe</button>
</div>
</div>
@@ -590,7 +591,7 @@ function renderGroup(f,kids){
async function feedAction(a,f){
if(a==='scan'){ toast('Scanning '+(f.title||f.id)+'…'); await api('/api/fetch',{method:'POST',body:JSON.stringify({feed:f.id,force:true})}); }
if(a==='read'){ const r=await api(`/api/feeds/${encodeURIComponent(f.id)}/read-all`,{method:'POST'}); toast(`Marked ${r.marked} read`); await loadFeeds(true); loadEntries(); }
if(a==='read'){ const r=await api(`/api/feeds/${encodeURIComponent(f.id)}/read-all`,{method:'POST'}); toast(`Marked ${r.marked} read`); await loadFeeds(true); renderFeed(); loadEntries(); }
if(a==='rm') removeFeed(f);
if(a==='settings') settingsModal(f);
if(a==='dl') downloadLatestModal(f);