Fix navigation that reload page (#1233)

This commit is contained in:
Zoe Roux 2025-12-20 22:08:53 +01:00 committed by GitHub
parent d8f4ea0a27
commit 11060df0d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -25,6 +25,8 @@ function useLinkTo({
href: href,
onPress: (e) => {
if (e?.defaultPrevented) return;
// prevent native navigation via href.
e.preventDefault();
if (href.startsWith("http")) {
Platform.OS === "web"
? window.open(href, "_blank")

View File

@ -43,7 +43,6 @@ export const useLanguagePreference = (player: VideoPlayer, slug: string) => {
forced: false,
});
useEffect(() => {
console.log("seraching for sub", sub.current, subtitles);
if (!subtitles || sub.current.idx === null) return;
let subRet = subtitles.findIndex(
sub.current.lang === "default"