mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 02:02:21 +00:00
fix(news): the browser keeps Local news an hour at most; docs say what the fixes do
Local kept World News API's rows listed after the server had deleted them. README names News among the routes refused behind a proxy; a timed-out request is said to count; the cockpit cached state is near the same place. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
671a256a6a
commit
caa6f6f812
5 files changed
+49
-8
No files matched your search
@@ -1083,6 +1083,7 @@ export function createNewsLayer({
|
||||
minor: page.reports.filter((r) =>
|
||||
withinNewsWindow(r, now(), maxWindowMs),
|
||||
),
|
||||
readAt: now(),
|
||||
loading: false,
|
||||
error: null,
|
||||
};
|
||||
@@ -1094,7 +1095,8 @@ export function createNewsLayer({
|
||||
...inView,
|
||||
// A missing key is read again with the next refresh, not each pan.
|
||||
readKey: need ? readKey : inView.readKey,
|
||||
minor: need ? [] : inView.minor,
|
||||
// World News API's news is kept an hour at most, as the server does.
|
||||
minor: need || now() - inView.readAt >= 3_600_000 ? [] : inView.minor,
|
||||
loading: false,
|
||||
error: need ? null : cause?.message || FEED_UNAVAILABLE,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user