mirror of
https://github.com/ranaldsgift/KefinTweaks.git
synced 2026-11-05 15:52:47 +01:00
Fix problem with trying to queue home job before it was ready
This commit is contained in:
+17
-16
@@ -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' });
|
||||
|
||||
Reference in New Issue
Block a user