Signals in a folder of their own in the feed list, as an OPML's feeds are (#255)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ async function loadFeeds(keepSel?: boolean){
|
||||
// All Subscriptions rather than picking one alphabetically. Nothing to land on at all (a
|
||||
// brand new account) leaves S.feed alone, so the empty state's own message shows instead.
|
||||
if(!keepSel && S.feeds.length){
|
||||
const known = S.feed && (VIEWS[S.feed] || signalOf(S.feed) || S.feeds.some(f=>f.id===S.feed));
|
||||
const known = S.feed && (VIEWS[S.feed] || S.feed===SIGNALS || signalOf(S.feed) || S.feeds.some(f=>f.id===S.feed));
|
||||
selectFeed(known ? S.feed! : ':all');
|
||||
}
|
||||
}
|
||||
@@ -103,10 +103,9 @@ function renderFeeds(){
|
||||
el.onpointerenter=el.ontouchstart=()=>prefetch(id);
|
||||
places.appendChild(el);
|
||||
}
|
||||
signalRows(places);
|
||||
list.appendChild(places);
|
||||
const shown=S.feeds.filter(f=>!q||(f.title||f.id).toLowerCase().includes(q));
|
||||
if(!shown.length){ list.insertAdjacentHTML('beforeend','<p class="empty" style="padding:20px 8px">No feeds.</p>'); return done(); }
|
||||
if(!shown.length){ signalFolder(list,q); 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.
|
||||
@@ -125,7 +124,10 @@ 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.
|
||||
@@ -169,6 +171,7 @@ 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