Fix problem with trying to queue home job before it was ready

This commit is contained in:
HighImKevin
2026-10-16 05:26:06 -04:00
parent 161761bbdc
commit 6f97a75d69
+17 -16
View File
@@ -2888,22 +2888,8 @@
syncHomeScreenChromeVisibility();
}
window.homeScreen3 = {
init: () => enqueueHomeViewJob({ type: 'home', hash: window.location.hash || '' }),
refreshHomeSections,
refreshHomeSectionById,
resolveDiscoverySection: buildDiscoverySectionInstance,
sectionHelper: () => window.sectionHelper,
getActiveHomeCategory: () => homeChromeActiveCategory || 'none',
isDiscoveryAllowedForActiveCategory,
refreshHomeCategoryChrome
};
//enhanceHomeScreen();
connectHomeSectionsReadyObserver();
//initHomeScreenChrome();
// Serialize home-view work: latest-wins pending + one drain at a time
// Serialize home-view work: latest-wins pending + one drain at a time.
// Declared before connectHomeSectionsReadyObserver / homeScreen3.init (they call enqueueHomeViewJob).
let homeViewPending = undefined; // undefined = empty; else { type, hash? }
let homeViewDrain = Promise.resolve();
@@ -2955,6 +2941,21 @@
return homeViewDrain;
}
window.homeScreen3 = {
init: () => enqueueHomeViewJob({ type: 'home', hash: window.location.hash || '' }),
refreshHomeSections,
refreshHomeSectionById,
resolveDiscoverySection: buildDiscoverySectionInstance,
sectionHelper: () => window.sectionHelper,
getActiveHomeCategory: () => homeChromeActiveCategory || 'none',
isDiscoveryAllowedForActiveCategory,
refreshHomeCategoryChrome
};
//enhanceHomeScreen();
connectHomeSectionsReadyObserver();
//initHomeScreenChrome();
if (window.KefinTweaksUtils && typeof window.KefinTweaksUtils.onViewPage === 'function') {
window.KefinTweaksUtils.onViewPage(() => {
enqueueHomeViewJob({ type: 'chrome' });