Refactor Trakt integration for improved session handling and UI updates

This update refines the Trakt integration by enhancing session management and updating UI components to better reflect watched states. The useTraktAutosync and useWatchProgress hooks have been optimized for more reliable session tracking and progress display. Additionally, the HeroSection and ActionButtons now provide clearer indicators of content watched status, improving user experience and synchronization with Trakt.
This commit is contained in:
tapframe 2025-06-19 23:52:51 +05:30
parent 6d8666d905
commit 6bd9cc8064

View file

@ -334,14 +334,13 @@ export const SeriesContent: React.FC<SeriesContentProps> = ({
style={[ style={[
styles.episodeCardHorizontal, styles.episodeCardHorizontal,
isTablet && styles.episodeCardHorizontalTablet, isTablet && styles.episodeCardHorizontalTablet,
// Enhanced border styling // Gradient border styling
{ {
borderWidth: 2, borderWidth: 1,
borderColor: 'transparent', // Make base border transparent borderColor: 'transparent',
// Add gradient border effect using shadow shadowColor: '#000',
shadowColor: currentTheme.colors.primary, shadowOffset: { width: 0, height: 4 },
shadowOffset: { width: 0, height: 0 }, shadowOpacity: 0.3,
shadowOpacity: 0.6,
shadowRadius: 8, shadowRadius: 8,
elevation: 12, elevation: 12,
} }
@ -352,26 +351,26 @@ export const SeriesContent: React.FC<SeriesContentProps> = ({
{/* Gradient Border Container */} {/* Gradient Border Container */}
<View style={{ <View style={{
position: 'absolute', position: 'absolute',
top: -2, top: -1,
left: -2, left: -1,
right: -2, right: -1,
bottom: -2, bottom: -1,
borderRadius: 18, borderRadius: 17,
zIndex: -1, zIndex: -1,
}}> }}>
<LinearGradient <LinearGradient
colors={[ colors={[
currentTheme.colors.primary + '80', // 80% opacity '#ffffff80', // White with 50% opacity
currentTheme.colors.primary + '40', // 40% opacity '#ffffff40', // White with 25% opacity
currentTheme.colors.primary + '20', // 20% opacity '#ffffff20', // White with 12% opacity
currentTheme.colors.primary + '40', // 40% opacity '#ffffff40', // White with 25% opacity
currentTheme.colors.primary + '80', // 80% opacity '#ffffff80', // White with 50% opacity
]} ]}
start={{ x: 0, y: 0 }} start={{ x: 0, y: 0 }}
end={{ x: 1, y: 1 }} end={{ x: 1, y: 1 }}
style={{ style={{
flex: 1, flex: 1,
borderRadius: 18, borderRadius: 17,
}} }}
/> />
</View> </View>