From 0eed6d1b237a612981938b32ce884b5f0c1bd13b Mon Sep 17 00:00:00 2001 From: Innei Date: Wed, 11 Dec 2024 19:24:47 +0800 Subject: [PATCH] fix(video): open entry url directly on mobile Signed-off-by: Innei --- .../src/modules/entry-column/Items/video-item.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/renderer/src/modules/entry-column/Items/video-item.tsx b/apps/renderer/src/modules/entry-column/Items/video-item.tsx index d9ee52cb6e..d645530f2b 100644 --- a/apps/renderer/src/modules/entry-column/Items/video-item.tsx +++ b/apps/renderer/src/modules/entry-column/Items/video-item.tsx @@ -1,3 +1,4 @@ +import { isMobile } from "@follow/components/hooks/useMobile.js" import { Skeleton } from "@follow/components/ui/skeleton/index.jsx" import { IN_ELECTRON } from "@follow/shared/constants" import { stopPropagation } from "@follow/utils/dom" @@ -66,7 +67,12 @@ export function VideoItem({ entryId, entryPreview, translation }: UniversalItemP
{ + onClick={(e) => { + if (isMobile() && entry.entries.url) { + window.open(entry.entries.url, "_blank") + e.stopPropagation() + return + } if (iframeSrc) { modalStack.present({ title: "",