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

View file

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