Explore: refresh with its own filters; the Statistics refresh stays on its page
The Statistics page's once-a-minute refresh also ran on #/stats/explore and drew the Statistics page over it, losing the filters. It now runs on the Statistics page only, and the explore page refreshes itself every minute with the same filters (not while the filter bar is being edited). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e94d3634b6
commit
7d93c373d1
2 files changed
+26
-2
No files matched your search
@@ -183,7 +183,9 @@ async function loadAll(since, heatSince, queryLog, vf, filtered) {
|
||||
// keeping the current render (dimmed) until the new one is ready.
|
||||
function scheduleRefresh(el, params, query, gen) {
|
||||
setTimeout(() => {
|
||||
if (gen !== generation || !location.hash.startsWith("#/stats") || !el.isConnected) return;
|
||||
// Only on the Statistics page itself: not #/stats/explore.
|
||||
const h = location.hash;
|
||||
if (gen !== generation || !(h === "#/stats" || h.startsWith("#/stats?")) || !el.isConnected) return;
|
||||
el.classList.add("refreshing");
|
||||
render(el, params, query).catch(() => el.classList.remove("refreshing"));
|
||||
}, 60_000);
|
||||
|
||||
Reference in new issue
Block a user