An open page takes up a new version by itself after a deploy (#388)

The live stream already came back after a deploy and the lists caught
up, but the page kept running the script it had loaded, in a tab or the
home-screen app, until reloaded by hand. Back after a drop, the page now
asks for / again without the cache; another app.js named there is a new
version. With nothing to lose it reloads, and the item that was open,
carried across in sessionStorage whole since a read one is off the
Unread list, is opened again. While an episode plays, a dialog is open,
a search is set or a field is typed in, it offers a reload in a toast.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-07 00:04:55 +00:00
parent e5388b443f
commit 742f76969e
4 changed files with 102 additions and 1 deletions

View File

@@ -123,8 +123,12 @@ function showList(r: ListPage, append: boolean, asked: number){
const gone=S.entries.filter(e=>kept(e)&&!entries.some(n=>entryKey(n)===entryKey(e)));
entries=[...gone,...entries];
}
// Reloaded for a new version (#388): the item that was open, open again, where it was in the list.
const back=append ? null : takeReopen();
if(back && !entries.some(e=>entryKey(e)===entryKey(back))) entries=[back,...entries];
S.entries = entries;
renderEntries();
if(back){ const e=S.entries.find(x=>entryKey(x)===entryKey(back)); if(e) selectEntry(e); }
}
/// A list being waited for: said with a spinner, so the click is seen to have been heard.
function listLoading(box=$('#eps')){