From 805d7e1fa6eab00b63cf91a55dbb18edd4b354ae Mon Sep 17 00:00:00 2001 From: tapframe Date: Fri, 20 Jun 2025 03:33:56 +0530 Subject: [PATCH] homescreen refresh fix --- src/screens/HomeScreen.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/screens/HomeScreen.tsx b/src/screens/HomeScreen.tsx index 483f512..99ad580 100644 --- a/src/screens/HomeScreen.tsx +++ b/src/screens/HomeScreen.tsx @@ -688,14 +688,17 @@ const HomeScreen = () => { useEffect(() => { const unsubscribe = navigation.addListener('focus', () => { + // Only refresh continue watching section on focus refreshContinueWatching(); - // Also refresh catalogs when returning to home screen - // This ensures new addons are shown even if the context event was missed - loadCatalogsProgressively(); + // Don't reload catalogs unless they haven't been loaded yet + // Catalogs will be refreshed through context updates when addons change + if (catalogs.length === 0 && !catalogsLoading) { + loadCatalogsProgressively(); + } }); return unsubscribe; - }, [navigation, refreshContinueWatching, loadCatalogsProgressively]); + }, [navigation, refreshContinueWatching, loadCatalogsProgressively, catalogs.length, catalogsLoading]); // Memoize the loading screen to prevent unnecessary re-renders const renderLoadingScreen = useMemo(() => {