updated card caching for frames

This commit is contained in:
2026-04-24 00:14:10 -07:00
parent 59a70fae0c
commit a129f0db6a
2 changed files with 10 additions and 3 deletions
+8 -2
View File
@@ -106,6 +106,9 @@
fit: "inside",
quality: 82
};
const defaultDeckWarmupOptions = {
includeThumbnails: true
};
const standardMajorCardNames = [
"Fool",
"Magus",
@@ -1202,7 +1205,10 @@
}
function scheduleDeckImagePreload(deckId, options = {}) {
return deferPreload(() => preloadDeckImages(deckId, options));
return deferPreload(() => preloadDeckImages(deckId, {
...defaultDeckWarmupOptions,
...options
}));
}
function resolveDisplayNameWithDeck(deckId, cardName, trumpNumber) {
@@ -1289,7 +1295,7 @@
function setActiveDeck(deckId) {
activeDeckId = normalizeDeckId(deckId);
getDeckManifest(activeDeckId);
const preloadUrls = buildDeckImagePreloadUrls(activeDeckId);
const preloadUrls = buildDeckImagePreloadUrls(activeDeckId, defaultDeckWarmupOptions);
const totalCount = preloadUrls.length;
const isWarmed = deckPreloadStatus.warmedDeckIds.includes(activeDeckId);
setDeckPreloadStatus({