From fefb0cda01b49e79894394ffe41efee5e2c7af8e Mon Sep 17 00:00:00 2001 From: tapframe <85391825+tapframe@users.noreply.github.com> Date: Thu, 22 Jan 2026 00:51:34 +0530 Subject: [PATCH] minor ui changes --- .../home/ContinueWatchingSection.tsx | 5 ++-- src/components/metadata/CastDetailsModal.tsx | 3 +-- src/components/metadata/MetadataDetails.tsx | 25 +++++++++++-------- src/screens/CastMoviesScreen.tsx | 3 ++- src/utils/version.ts | 2 +- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/components/home/ContinueWatchingSection.tsx b/src/components/home/ContinueWatchingSection.tsx index 30e41a5a..104f4d9f 100644 --- a/src/components/home/ContinueWatchingSection.tsx +++ b/src/components/home/ContinueWatchingSection.tsx @@ -2165,7 +2165,8 @@ const ContinueWatchingSection = React.forwardRef((props, re } return ( - @@ -2304,7 +2305,7 @@ const ContinueWatchingSection = React.forwardRef((props, re )} - + ); }); diff --git a/src/components/metadata/CastDetailsModal.tsx b/src/components/metadata/CastDetailsModal.tsx index cce5b252..5262e89e 100644 --- a/src/components/metadata/CastDetailsModal.tsx +++ b/src/components/metadata/CastDetailsModal.tsx @@ -33,7 +33,6 @@ import Animated, { useAnimatedStyle, useSharedValue, withTiming, - withSpring, runOnJS, } from 'react-native-reanimated'; import { LinearGradient } from 'expo-linear-gradient'; @@ -83,7 +82,7 @@ export const CastDetailsModal: React.FC = ({ useEffect(() => { if (visible && castMember) { 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) { fetchPersonDetails(); diff --git a/src/components/metadata/MetadataDetails.tsx b/src/components/metadata/MetadataDetails.tsx index 57b25d35..cde9ab4d 100644 --- a/src/components/metadata/MetadataDetails.tsx +++ b/src/components/metadata/MetadataDetails.tsx @@ -110,26 +110,32 @@ const MetadataDetails: React.FC = ({ 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 { height } = event.nativeEvent.layout; - setMeasuredHeights(prev => ({ ...prev, collapsed: height })); - // Only set initial measurement flag once we have a valid height + setMeasuredHeights(prev => { + const newHeights = { ...prev, collapsed: height }; + if (newHeights.expanded > 0 && height > 0) { + setIsTextTruncated(newHeights.expanded > height); + } + return newHeights; + }); if (height > 0 && !hasInitialMeasurement) { setHasInitialMeasurement(true); - // Update animated height immediately without animation for first measurement animatedHeight.value = height; } }; const handleExpandedTextLayout = (event: any) => { 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 @@ -382,7 +388,6 @@ const MetadataDetails: React.FC = ({ } ]} numberOfLines={isFullDescriptionOpen ? undefined : 3} - onTextLayout={handleTextLayout} > {metadata.description} diff --git a/src/screens/CastMoviesScreen.tsx b/src/screens/CastMoviesScreen.tsx index 3b9d39b2..d278b5e1 100644 --- a/src/screens/CastMoviesScreen.tsx +++ b/src/screens/CastMoviesScreen.tsx @@ -40,7 +40,8 @@ import CustomAlert from '../components/CustomAlert'; const { width, height } = Dimensions.get('window'); const isTablet = width >= 768; 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; interface CastMovie { diff --git a/src/utils/version.ts b/src/utils/version.ts index d681c860..232d4534 100644 --- a/src/utils/version.ts +++ b/src/utils/version.ts @@ -1,7 +1,7 @@ // Single source of truth for the app version displayed in Settings // Update this when bumping app version -export const APP_VERSION = '1.3.6'; +export const APP_VERSION = '1.3.5'; export function getDisplayedAppVersion(): string { return APP_VERSION;