mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-01 02:12:26 +00:00
Ensure watch history loads include full lists by default
This commit is contained in:
1 parent
10751a8fb9
commit
46ef2b8123
3 files changed
+10
-3
No files matched your search
+3
-1
@@ -572,7 +572,9 @@ export function createWatchHistoryRenderer(config = {}) {
|
||||
});
|
||||
return engine.run("watch-history", { runtime });
|
||||
}
|
||||
const items = await watchHistoryService.loadLatest(actorInput);
|
||||
const items = await watchHistoryService.loadLatest(actorInput, {
|
||||
allowStale: true,
|
||||
});
|
||||
const normalized = normalizeHistoryItems(items);
|
||||
return { items: normalized, metadata: { engine: "service-fallback" } };
|
||||
},
|
||||
|
||||
@@ -1250,7 +1250,10 @@ async function loadLatest(actorInput, options = {}) {
|
||||
|
||||
const normalizedOptions =
|
||||
options && typeof options === "object" ? options : {};
|
||||
const allowStale = normalizedOptions.allowStale !== false;
|
||||
// Only callers that can react to a later fingerprint update should opt into
|
||||
// stale cache reads; everyone else waits for the fresh list so they do not
|
||||
// miss entries.
|
||||
const allowStale = normalizedOptions.allowStale === true;
|
||||
|
||||
if (!isFeatureEnabled(actorKey)) {
|
||||
if (!state.restored) {
|
||||
|
||||
@@ -1061,7 +1061,9 @@ async function testWatchHistoryStaleCacheRefresh() {
|
||||
return refreshedItems;
|
||||
};
|
||||
|
||||
const staleResult = await watchHistoryService.loadLatest(actor);
|
||||
const staleResult = await watchHistoryService.loadLatest(actor, {
|
||||
allowStale: true,
|
||||
});
|
||||
assert.equal(
|
||||
resolveCallCount,
|
||||
1,
|
||||
|
||||
Reference in new issue
Block a user