hgdf
This commit is contained in:
@@ -2216,12 +2216,14 @@ window.cancelAnimFrame = (function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Check for cached grid (Index/Grid Only) - RESTORE EARLY to avoid pagination/layout destruction
|
// Check for cached grid (Index/Grid Only) - RESTORE EARLY to avoid pagination/layout destruction.
|
||||||
if (isGrid && options.skipPush) {
|
// The cache is checked on ANY grid navigation (not just popstate/skipPush), so clicking the
|
||||||
|
// navbar brand from an item view restores the grid instantly without re-fetching.
|
||||||
|
if (isGrid && !options.skipCache) {
|
||||||
const targetCacheKey = urlObj.pathname + urlObj.search;
|
const targetCacheKey = urlObj.pathname + urlObj.search;
|
||||||
if (gridCacheMap.has(targetCacheKey)) {
|
if (gridCacheMap.has(targetCacheKey)) {
|
||||||
const cache = gridCacheMap.get(targetCacheKey);
|
const cache = gridCacheMap.get(targetCacheKey);
|
||||||
gridCacheMap.delete(targetCacheKey); // Consume cache
|
// Keep cache alive — it is already cleared on mode/filter changes (gridCacheMap.clear()).
|
||||||
|
|
||||||
stopMedia();
|
stopMedia();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user