minor ui changes

This commit is contained in:
tapframe 2026-01-22 00:51:34 +05:30
parent 68dd37cc1d
commit fefb0cda01
5 changed files with 22 additions and 16 deletions

View file

@ -2165,7 +2165,8 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
} }
return ( return (
<View <Animated.View
entering={FadeIn.duration(400)}
style={styles.container} style={styles.container}
> >
<View style={[styles.header, { paddingHorizontal: horizontalPadding }]}> <View style={[styles.header, { paddingHorizontal: horizontalPadding }]}>
@ -2304,7 +2305,7 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
)} )}
</BottomSheetView> </BottomSheetView>
</BottomSheetModal> </BottomSheetModal>
</View> </Animated.View>
); );
}); });

View file

@ -33,7 +33,6 @@ import Animated, {
useAnimatedStyle, useAnimatedStyle,
useSharedValue, useSharedValue,
withTiming, withTiming,
withSpring,
runOnJS, runOnJS,
} from 'react-native-reanimated'; } from 'react-native-reanimated';
import { LinearGradient } from 'expo-linear-gradient'; import { LinearGradient } from 'expo-linear-gradient';
@ -83,7 +82,7 @@ export const CastDetailsModal: React.FC<CastDetailsModalProps> = ({
useEffect(() => { useEffect(() => {
if (visible && castMember) { if (visible && castMember) {
modalOpacity.value = withTiming(1, { duration: 250 }); modalOpacity.value = withTiming(1, { duration: 250 });
modalScale.value = withSpring(1, { damping: 20, stiffness: 200 }); modalScale.value = withTiming(1, { duration: 250 });
if (!hasFetched || personDetails?.id !== castMember.id) { if (!hasFetched || personDetails?.id !== castMember.id) {
fetchPersonDetails(); fetchPersonDetails();

View file

@ -110,26 +110,32 @@ const MetadataDetails: React.FC<MetadataDetailsProps> = ({
checkMDBListEnabled(); checkMDBListEnabled();
}, []); }, []);
const handleTextLayout = (event: any) => {
const { lines } = event.nativeEvent;
// If we have 3 or more lines, it means the text was truncated
setIsTextTruncated(lines.length >= 3);
};
const handleCollapsedTextLayout = (event: any) => { const handleCollapsedTextLayout = (event: any) => {
const { height } = event.nativeEvent.layout; const { height } = event.nativeEvent.layout;
setMeasuredHeights(prev => ({ ...prev, collapsed: height })); setMeasuredHeights(prev => {
// Only set initial measurement flag once we have a valid height const newHeights = { ...prev, collapsed: height };
if (newHeights.expanded > 0 && height > 0) {
setIsTextTruncated(newHeights.expanded > height);
}
return newHeights;
});
if (height > 0 && !hasInitialMeasurement) { if (height > 0 && !hasInitialMeasurement) {
setHasInitialMeasurement(true); setHasInitialMeasurement(true);
// Update animated height immediately without animation for first measurement
animatedHeight.value = height; animatedHeight.value = height;
} }
}; };
const handleExpandedTextLayout = (event: any) => { const handleExpandedTextLayout = (event: any) => {
const { height } = event.nativeEvent.layout; const { height } = event.nativeEvent.layout;
setMeasuredHeights(prev => ({ ...prev, expanded: height })); setMeasuredHeights(prev => {
const newHeights = { ...prev, expanded: height };
if (newHeights.collapsed > 0 && height > 0) {
setIsTextTruncated(height > newHeights.collapsed);
}
return newHeights;
});
}; };
// Animate height changes // Animate height changes
@ -382,7 +388,6 @@ const MetadataDetails: React.FC<MetadataDetailsProps> = ({
} }
]} ]}
numberOfLines={isFullDescriptionOpen ? undefined : 3} numberOfLines={isFullDescriptionOpen ? undefined : 3}
onTextLayout={handleTextLayout}
> >
{metadata.description} {metadata.description}
</Text> </Text>

View file

@ -40,7 +40,8 @@ import CustomAlert from '../components/CustomAlert';
const { width, height } = Dimensions.get('window'); const { width, height } = Dimensions.get('window');
const isTablet = width >= 768; const isTablet = width >= 768;
const numColumns = isTablet ? 4 : 3; const numColumns = isTablet ? 4 : 3;
const posterWidth = (width - 60 - (numColumns - 1) * 12) / numColumns; const HORIZONTAL_PADDING = 20;
const posterWidth = (width - (HORIZONTAL_PADDING * 2) - (numColumns - 1) * 12) / numColumns;
const posterHeight = posterWidth * 1.5; const posterHeight = posterWidth * 1.5;
interface CastMovie { interface CastMovie {

View file

@ -1,7 +1,7 @@
// Single source of truth for the app version displayed in Settings // Single source of truth for the app version displayed in Settings
// Update this when bumping app version // Update this when bumping app version
export const APP_VERSION = '1.3.6'; export const APP_VERSION = '1.3.5';
export function getDisplayedAppVersion(): string { export function getDisplayedAppVersion(): string {
return APP_VERSION; return APP_VERSION;