Signals folder under All Subscriptions, with its + on the folder's row (#256)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -104,8 +104,9 @@ function renderFeeds(){
|
||||
places.appendChild(el);
|
||||
}
|
||||
list.appendChild(places);
|
||||
signalFolder(list,q);
|
||||
const shown=S.feeds.filter(f=>!q||(f.title||f.id).toLowerCase().includes(q));
|
||||
if(!shown.length){ signalFolder(list,q); list.insertAdjacentHTML('beforeend','<p class="empty" style="padding:20px 8px">No feeds.</p>'); return done(); }
|
||||
if(!shown.length){ list.insertAdjacentHTML('beforeend','<p class="empty" style="padding:20px 8px">No feeds.</p>'); return done(); }
|
||||
|
||||
// Feeds from a subscribed OPML sit under it, so the group reads as one thing. Pinned feeds
|
||||
// go first: a folder with its feeds under it, a feed from inside one lifted out of it.
|
||||
@@ -124,10 +125,7 @@ function renderFeeds(){
|
||||
// it is open.
|
||||
const lastTop=order.findIndex(([f,d])=>!d&&!f.pinned);
|
||||
const lastPin=(lastTop<0?order.filter(([f])=>f.pinned):order.slice(0,lastTop)).pop()?.[0];
|
||||
// The Signals folder goes under the pinned feeds, which are first because you put them there.
|
||||
let folder=false;
|
||||
for(const [f,depth] of order){
|
||||
if(!folder&&!depth&&!f.pinned){ signalFolder(list,q); folder=true; }
|
||||
const kids=inside(f).length;
|
||||
// A subscription holds no entries itself, so its counts are the sum of what is inside --
|
||||
// taken from every feed it holds, not just the ones a filter left showing.
|
||||
@@ -171,7 +169,6 @@ function renderFeeds(){
|
||||
for(const img of $$('img',el)){ const was=drawn.get(img.outerHTML)?.shift(); if(was) img.replaceWith(was); }
|
||||
list.appendChild(el);
|
||||
}
|
||||
if(!folder) signalFolder(list,q);
|
||||
paintScanning();
|
||||
done();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user