small fix

This commit is contained in:
tapframe 2025-09-06 02:39:54 +05:30
parent a30ace14c9
commit 5ddf26af34
4 changed files with 7 additions and 3 deletions

View file

@ -104,11 +104,12 @@ const CatalogSection = ({ catalog }: CatalogSectionProps) => {
keyExtractor={keyExtractor} keyExtractor={keyExtractor}
horizontal horizontal
showsHorizontalScrollIndicator={false} showsHorizontalScrollIndicator={false}
contentContainerStyle={[styles.catalogList, { paddingRight: 16 - posterLayout.partialPosterWidth }]} contentContainerStyle={StyleSheet.flatten([styles.catalogList, { paddingRight: 16 - posterLayout.partialPosterWidth }])}
ItemSeparatorComponent={ItemSeparator} ItemSeparatorComponent={ItemSeparator}
onEndReachedThreshold={0.7} onEndReachedThreshold={0.7}
onEndReached={() => {}} onEndReached={() => {}}
scrollEventThrottle={16} scrollEventThrottle={16}
estimatedItemSize={POSTER_WIDTH + 8}
/> />
</Animated.View> </Animated.View>
); );

View file

@ -631,6 +631,7 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
ItemSeparatorComponent={() => <View style={{ width: 16 }} />} ItemSeparatorComponent={() => <View style={{ width: 16 }} />}
onEndReachedThreshold={0.7} onEndReachedThreshold={0.7}
onEndReached={() => {}} onEndReached={() => {}}
estimatedItemSize={280 + 16}
/> />
</Animated.View> </Animated.View>
); );

View file

@ -708,6 +708,7 @@ const CatalogScreen: React.FC<CatalogScreenProps> = ({ route, navigation }) => {
} }
contentContainerStyle={styles.list} contentContainerStyle={styles.list}
showsVerticalScrollIndicator={false} showsVerticalScrollIndicator={false}
estimatedItemSize={effectiveItemWidth * 1.5 + SPACING.lg}
/> />
) : renderEmptyState()} ) : renderEmptyState()}
</SafeAreaView> </SafeAreaView>

View file

@ -756,10 +756,10 @@ const HomeScreen = () => {
data={listData} data={listData}
renderItem={renderListItem} renderItem={renderListItem}
keyExtractor={item => item.key} keyExtractor={item => item.key}
contentContainerStyle={[ contentContainerStyle={StyleSheet.flatten([
styles.scrollContent, styles.scrollContent,
{ paddingTop: insets.top } { paddingTop: insets.top }
]} ])}
showsVerticalScrollIndicator={false} showsVerticalScrollIndicator={false}
ListHeaderComponent={memoizedHeader} ListHeaderComponent={memoizedHeader}
ListFooterComponent={ListFooterComponent} ListFooterComponent={ListFooterComponent}
@ -767,6 +767,7 @@ const HomeScreen = () => {
onEndReached={handleLoadMoreCatalogs} onEndReached={handleLoadMoreCatalogs}
onEndReachedThreshold={0.6} onEndReachedThreshold={0.6}
scrollEventThrottle={32} scrollEventThrottle={32}
estimatedItemSize={220}
onScroll={event => { onScroll={event => {
const y = event.nativeEvent.contentOffset.y; const y = event.nativeEvent.contentOffset.y;
const dy = y - lastScrollYRef.current; const dy = y - lastScrollYRef.current;