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

3
.gitignore vendored
View file

@ -76,4 +76,5 @@ bottomnav.md
mmkv.md
src/services/tmdbService.ts
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
const renderItem = useCallback(({ item }: { item: StreamingContent }) => {
return <CarouselItemWrapper item={item} />;
return (
<View style={{ paddingHorizontal: 6 }}>
<CarouselItemWrapper item={item} />
</View>
);
}, [isSaved, handleSaveToLibrary, navigation]);
// Pagination press handler
@ -711,7 +715,7 @@ const FeaturedContent = ({ featuredContent, isSaved, handleSaveToLibrary, loadin
snapEnabled={true}
pagingEnabled={true}
autoPlay={items.length > 1}
autoPlayInterval={4000}
autoPlayInterval={10000}
data={items}
defaultScrollOffsetValue={scrollOffsetValue}
onProgressChange={progress}
@ -732,17 +736,6 @@ const FeaturedContent = ({ featuredContent, isSaved, handleSaveToLibrary, loadin
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>
{/* Pagination strictly below the hero container (not clipped by overflow) */}
{items.length > 1 && (
@ -751,6 +744,8 @@ const FeaturedContent = ({ featuredContent, isSaved, handleSaveToLibrary, loadin
alignItems: 'center',
paddingTop: isTablet ? 10 : 8,
paddingBottom: isTablet ? 10 : 8,
position: 'relative',
zIndex: 1,
}}
pointerEvents="auto"
>

View file

@ -635,12 +635,26 @@ const HomeScreen = () => {
loading={featuredLoading}
/>
) : (
<FeaturedContent
featuredContent={allFeaturedContent || (featuredContent ? [featuredContent] : [])}
isSaved={isItemSaved}
handleSaveToLibrary={handleSaveToLibrary}
loading={featuredLoading}
/>
<>
<FeaturedContent
featuredContent={allFeaturedContent || (featuredContent ? [featuredContent] : [])}
isSaved={isItemSaved}
handleSaveToLibrary={handleSaveToLibrary}
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]);