diff --git a/src/components/home/ContinueWatchingSection.tsx b/src/components/home/ContinueWatchingSection.tsx index 2539ed59e..2872d4106 100644 --- a/src/components/home/ContinueWatchingSection.tsx +++ b/src/components/home/ContinueWatchingSection.tsx @@ -322,7 +322,7 @@ const ContinueWatchingSection = React.forwardRef((props, re }, [navigation]); // If no continue watching items, don't render anything - if (continueWatchingItems.length === 0 && !loading) { + if (continueWatchingItems.length === 0) { return null; } diff --git a/src/screens/HomeScreen.tsx b/src/screens/HomeScreen.tsx index 9a248eeb0..9eb77a557 100644 --- a/src/screens/HomeScreen.tsx +++ b/src/screens/HomeScreen.tsx @@ -624,49 +624,6 @@ const HomeScreen = () => { - {/* Debug buttons for Continue Watching */} - - - - Add Test Progress - - - - - Clear All Progress - - - - - Refresh - - - - {catalogs.length > 0 ? ( @@ -709,58 +666,6 @@ const HomeScreen = () => { featuredContentSource ]); - // Debug function to add test watch progress - const addTestWatchProgress = useCallback(async () => { - console.log('[HomeScreen] Adding test watch progress data...'); - try { - // Add a test movie with 50% progress - await storageService.setWatchProgress( - 'tt1375666', // Inception IMDB ID - 'movie', - { - currentTime: 3600, // 1 hour - duration: 7200, // 2 hours (50% progress) - lastUpdated: Date.now() - } - ); - - // Add a test series episode with 30% progress - await storageService.setWatchProgress( - 'tt0944947', // Game of Thrones IMDB ID - 'series', - { - currentTime: 1800, // 30 minutes - duration: 6000, // 100 minutes (30% progress) - lastUpdated: Date.now() - 86400000 // 1 day ago - }, - 'tt0944947:1:1' // Season 1, Episode 1 - ); - - console.log('[HomeScreen] Test watch progress added successfully'); - - // Refresh the continue watching section - await refreshContinueWatching(); - } catch (error) { - console.error('[HomeScreen] Error adding test watch progress:', error); - } - }, [refreshContinueWatching]); - - // Debug function to clear all watch progress - const clearAllWatchProgress = useCallback(async () => { - console.log('[HomeScreen] Clearing all watch progress...'); - try { - const allProgress = await storageService.getAllWatchProgress(); - for (const key of Object.keys(allProgress)) { - const [type, id, episodeId] = key.split(':'); - await storageService.removeWatchProgress(id, type, episodeId); - } - console.log('[HomeScreen] All watch progress cleared'); - await refreshContinueWatching(); - } catch (error) { - console.error('[HomeScreen] Error clearing watch progress:', error); - } - }, [refreshContinueWatching]); - return isLoading ? renderLoadingScreen : renderMainContent; };