This commit is contained in:
tapframe 2025-11-05 13:45:23 +05:30
parent b17b492741
commit a5a66a5e8c
3 changed files with 30 additions and 20 deletions

1
.gitignore vendored
View file

@ -77,3 +77,4 @@ mmkv.md
src/services/tmdbService.ts src/services/tmdbService.ts
fix-android-scroll-lag-summary.md fix-android-scroll-lag-summary.md
server/cache-server server/cache-server
carousal.md

View file

@ -668,7 +668,11 @@ const FeaturedContent = ({ featuredContent, isSaved, handleSaveToLibrary, loadin
// Render item function for the carousel // Render item function for the carousel
const renderItem = useCallback(({ item }: { item: StreamingContent }) => { const renderItem = useCallback(({ item }: { item: StreamingContent }) => {
return <CarouselItemWrapper item={item} />; return (
<View style={{ paddingHorizontal: 6 }}>
<CarouselItemWrapper item={item} />
</View>
);
}, [isSaved, handleSaveToLibrary, navigation]); }, [isSaved, handleSaveToLibrary, navigation]);
// Pagination press handler // Pagination press handler
@ -711,7 +715,7 @@ const FeaturedContent = ({ featuredContent, isSaved, handleSaveToLibrary, loadin
snapEnabled={true} snapEnabled={true}
pagingEnabled={true} pagingEnabled={true}
autoPlay={items.length > 1} autoPlay={items.length > 1}
autoPlayInterval={4000} autoPlayInterval={10000}
data={items} data={items}
defaultScrollOffsetValue={scrollOffsetValue} defaultScrollOffsetValue={scrollOffsetValue}
onProgressChange={progress} onProgressChange={progress}
@ -732,17 +736,6 @@ const FeaturedContent = ({ featuredContent, isSaved, handleSaveToLibrary, loadin
renderItem={renderItem} renderItem={renderItem}
/> />
{/* Bottom fade to blend with background */}
<LinearGradient
colors={[
'transparent',
currentTheme.colors.darkBackground
]}
locations={[0, 1]}
style={isTablet ? styles.tabletBottomFade as ViewStyle : styles.phoneBottomFade as ViewStyle}
pointerEvents="none"
/>
</Animated.View> </Animated.View>
{/* Pagination strictly below the hero container (not clipped by overflow) */} {/* Pagination strictly below the hero container (not clipped by overflow) */}
{items.length > 1 && ( {items.length > 1 && (
@ -751,6 +744,8 @@ const FeaturedContent = ({ featuredContent, isSaved, handleSaveToLibrary, loadin
alignItems: 'center', alignItems: 'center',
paddingTop: isTablet ? 10 : 8, paddingTop: isTablet ? 10 : 8,
paddingBottom: isTablet ? 10 : 8, paddingBottom: isTablet ? 10 : 8,
position: 'relative',
zIndex: 1,
}} }}
pointerEvents="auto" pointerEvents="auto"
> >

View file

@ -635,12 +635,26 @@ const HomeScreen = () => {
loading={featuredLoading} loading={featuredLoading}
/> />
) : ( ) : (
<>
<FeaturedContent <FeaturedContent
featuredContent={allFeaturedContent || (featuredContent ? [featuredContent] : [])} featuredContent={allFeaturedContent || (featuredContent ? [featuredContent] : [])}
isSaved={isItemSaved} isSaved={isItemSaved}
handleSaveToLibrary={handleSaveToLibrary} handleSaveToLibrary={handleSaveToLibrary}
loading={featuredLoading} loading={featuredLoading}
/> />
<LinearGradient
colors={["transparent", currentTheme.colors.darkBackground]}
locations={[0, 1]}
style={{
height: isTablet ? 40 : 30,
width: '100%',
marginTop: -(isTablet ? 40 : 30),
position: 'relative',
zIndex: -1,
}}
pointerEvents="none"
/>
</>
); );
}, [isTablet, settings.heroStyle, showHeroSection, featuredContentSource, allFeaturedContent, featuredContent, isItemSaved, handleSaveToLibrary, featuredLoading]); }, [isTablet, settings.heroStyle, showHeroSection, featuredContentSource, allFeaturedContent, featuredContent, isItemSaved, handleSaveToLibrary, featuredLoading]);