mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-11 17:45:38 +00:00
Forces reset of the fetch guard when lastUpdate changes
This commit is contained in:
parent
baee619d73
commit
af1b0b03d8
1 changed files with 16 additions and 1 deletions
|
|
@ -373,7 +373,22 @@ const HomeScreen = () => {
|
|||
|
||||
// Listen for catalog changes (addon additions/removals) and reload catalogs
|
||||
useEffect(() => {
|
||||
loadCatalogsProgressively();
|
||||
// Skip initial mount (handled by the loadCatalogsProgressively effect)
|
||||
if (lastUpdate === 0) return;
|
||||
|
||||
// Force reset the fetch guard to ensure refresh happens
|
||||
isFetchingRef.current = false;
|
||||
|
||||
// Invalidate catalog settings cache so fresh settings are loaded
|
||||
cachedCatalogSettings = null;
|
||||
catalogSettingsCacheTimestamp = 0;
|
||||
|
||||
// Small delay to ensure previous fetch is fully stopped
|
||||
const timer = setTimeout(() => {
|
||||
loadCatalogsProgressively();
|
||||
}, 100);
|
||||
|
||||
return () => clearTimeout(timer);
|
||||
}, [lastUpdate, loadCatalogsProgressively]);
|
||||
|
||||
// One-time hint after skipping login in onboarding
|
||||
|
|
|
|||
Loading…
Reference in a new issue