mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(news): follow-up review of the fixes
Deleted World News API news is not restored by a refresh that fails; a refund goes only to the day the read was counted in, and not to a request that timed out; a cockpit brief from another place is dropped, not kept for a language change; a feed list started over lets scrolling ask again. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
bb7e7ecad6
commit
671a256a6a
6 files changed
+102
-30
No files matched your search
+6
-1
@@ -67,7 +67,12 @@ export function createNewsPanel({ container, setLayerParams = () => {} } = {}) {
|
||||
const filters = JSON.stringify(next?.filters ?? null);
|
||||
// A new list (other filters or hotspot), or a read that failed, may stop
|
||||
// at the same length as the last request: let the next scroll ask.
|
||||
if (filters !== shownFilters || (next?.error && !view?.error))
|
||||
// A list started over is shorter than the one the last request saw.
|
||||
if (
|
||||
filters !== shownFilters ||
|
||||
(next?.error && !view?.error) ||
|
||||
(next?.items?.length ?? 0) < requestedAt
|
||||
)
|
||||
requestedAt = -1;
|
||||
shownFilters = filters;
|
||||
view = next || null;
|
||||
|
||||
Reference in new issue
Block a user