mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-03-10 11:53:38 -04:00
Fix navigation that reload page (#1233)
This commit is contained in:
parent
d8f4ea0a27
commit
11060df0d0
@ -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")
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user