This commit is contained in:
tapframe 2025-08-13 14:09:55 +05:30
parent 340ba19176
commit 3f1def52bd

View file

@ -604,17 +604,23 @@ export const StreamsScreen = () => {
filterOpacity.value = withTiming(0, { duration: 100 });
};
cleanup();
// For series episodes, always replace current screen with metadata screen
if (type === 'series') {
// Immediate navigation for series
navigation.replace('Metadata', {
id: id,
type: type
// Reset stack to ensure there is always a screen to go back to from Metadata
(navigation as any).reset({
index: 1,
routes: [
{ name: 'MainTabs' },
{ name: 'Metadata', params: { id, type } }
]
});
} else {
// Immediate navigation for movies
return;
}
if (navigation.canGoBack()) {
navigation.goBack();
} else {
(navigation as any).navigate('MainTabs');
}
}, [navigation, headerOpacity, heroScale, filterOpacity, type, id]);