episode poster fix
This commit is contained in:
parent
786e06b27f
commit
060b0b927b
1 changed files with 40 additions and 10 deletions
|
|
@ -177,9 +177,10 @@ const TabletStreamsLayout: React.FC<TabletStreamsLayoutProps> = ({
|
||||||
return undefined;
|
return undefined;
|
||||||
}, [episodeImage, bannerImage, metadata?.poster, backdropError]);
|
}, [episodeImage, bannerImage, metadata?.poster, backdropError]);
|
||||||
|
|
||||||
// Animate backdrop when it loads
|
// Animate backdrop when it loads, or animate content immediately if no backdrop
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (backdropSource?.uri && backdropLoaded) {
|
if (backdropSource?.uri && backdropLoaded) {
|
||||||
|
// Animate backdrop first
|
||||||
backdropOpacity.value = withTiming(1, {
|
backdropOpacity.value = withTiming(1, {
|
||||||
duration: 800,
|
duration: 800,
|
||||||
easing: Easing.out(Easing.cubic)
|
easing: Easing.out(Easing.cubic)
|
||||||
|
|
@ -207,6 +208,25 @@ const TabletStreamsLayout: React.FC<TabletStreamsLayoutProps> = ({
|
||||||
duration: 600,
|
duration: 600,
|
||||||
easing: Easing.out(Easing.cubic)
|
easing: Easing.out(Easing.cubic)
|
||||||
}));
|
}));
|
||||||
|
} else if (!backdropSource?.uri) {
|
||||||
|
// No backdrop available, animate content panels immediately
|
||||||
|
leftPanelOpacity.value = withTiming(1, {
|
||||||
|
duration: 600,
|
||||||
|
easing: Easing.out(Easing.cubic)
|
||||||
|
});
|
||||||
|
leftPanelTranslateX.value = withTiming(0, {
|
||||||
|
duration: 600,
|
||||||
|
easing: Easing.out(Easing.cubic)
|
||||||
|
});
|
||||||
|
|
||||||
|
rightPanelOpacity.value = withDelay(200, withTiming(1, {
|
||||||
|
duration: 600,
|
||||||
|
easing: Easing.out(Easing.cubic)
|
||||||
|
}));
|
||||||
|
rightPanelTranslateX.value = withDelay(200, withTiming(0, {
|
||||||
|
duration: 600,
|
||||||
|
easing: Easing.out(Easing.cubic)
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}, [backdropSource?.uri, backdropLoaded]);
|
}, [backdropSource?.uri, backdropLoaded]);
|
||||||
|
|
||||||
|
|
@ -368,15 +388,21 @@ const TabletStreamsLayout: React.FC<TabletStreamsLayoutProps> = ({
|
||||||
return (
|
return (
|
||||||
<View style={styles.tabletLayout}>
|
<View style={styles.tabletLayout}>
|
||||||
{/* Full Screen Background with Entrance Animation */}
|
{/* Full Screen Background with Entrance Animation */}
|
||||||
<Animated.View style={[styles.tabletFullScreenBackground, backdropAnimatedStyle]}>
|
{backdropSource?.uri ? (
|
||||||
<FastImage
|
<Animated.View style={[styles.tabletFullScreenBackground, backdropAnimatedStyle]}>
|
||||||
source={backdropSource}
|
<FastImage
|
||||||
style={StyleSheet.absoluteFillObject}
|
source={backdropSource}
|
||||||
resizeMode={FastImage.resizeMode.cover}
|
style={StyleSheet.absoluteFillObject}
|
||||||
onLoad={handleBackdropLoad}
|
resizeMode={FastImage.resizeMode.cover}
|
||||||
onError={handleBackdropError}
|
onLoad={handleBackdropLoad}
|
||||||
/>
|
onError={handleBackdropError}
|
||||||
</Animated.View>
|
/>
|
||||||
|
</Animated.View>
|
||||||
|
) : (
|
||||||
|
<View style={styles.tabletFullScreenBackground}>
|
||||||
|
<View style={styles.tabletNoBackdropBackground} />
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
<LinearGradient
|
<LinearGradient
|
||||||
colors={['rgba(0,0,0,0.2)', 'rgba(0,0,0,0.4)', 'rgba(0,0,0,0.6)']}
|
colors={['rgba(0,0,0,0.2)', 'rgba(0,0,0,0.4)', 'rgba(0,0,0,0.6)']}
|
||||||
locations={[0, 0.5, 1]}
|
locations={[0, 0.5, 1]}
|
||||||
|
|
@ -685,6 +711,10 @@ const createStyles = (colors: any) => StyleSheet.create({
|
||||||
tabletFullScreenBackground: {
|
tabletFullScreenBackground: {
|
||||||
...StyleSheet.absoluteFillObject,
|
...StyleSheet.absoluteFillObject,
|
||||||
},
|
},
|
||||||
|
tabletNoBackdropBackground: {
|
||||||
|
...StyleSheet.absoluteFillObject,
|
||||||
|
backgroundColor: colors.darkBackground,
|
||||||
|
},
|
||||||
tabletFullScreenGradient: {
|
tabletFullScreenGradient: {
|
||||||
...StyleSheet.absoluteFillObject,
|
...StyleSheet.absoluteFillObject,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue