Skip to content

Commit 0eed6d1

Browse files
committed
fix(video): open entry url directly on mobile
Signed-off-by: Innei <tukon479@gmail.com>
1 parent 9bcb268 commit 0eed6d1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

apps/renderer/src/modules/entry-column/Items/video-item.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { isMobile } from "@follow/components/hooks/useMobile.js"
12
import { Skeleton } from "@follow/components/ui/skeleton/index.jsx"
23
import { IN_ELECTRON } from "@follow/shared/constants"
34
import { stopPropagation } from "@follow/utils/dom"
@@ -66,7 +67,12 @@ export function VideoItem({ entryId, entryPreview, translation }: UniversalItemP
6667
<GridItem entryId={entryId} entryPreview={entryPreview} translation={translation}>
6768
<div
6869
className="w-full cursor-card"
69-
onClick={() => {
70+
onClick={(e) => {
71+
if (isMobile() && entry.entries.url) {
72+
window.open(entry.entries.url, "_blank")
73+
e.stopPropagation()
74+
return
75+
}
7076
if (iframeSrc) {
7177
modalStack.present({
7278
title: "",

0 commit comments

Comments
 (0)