Skip to content

Commit

Permalink
fix(video): open entry url directly on mobile
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Dec 11, 2024
1 parent 9bcb268 commit 0eed6d1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/renderer/src/modules/entry-column/Items/video-item.tsx
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -66,7 +67,12 @@ export function VideoItem({ entryId, entryPreview, translation }: UniversalItemP
<GridItem entryId={entryId} entryPreview={entryPreview} translation={translation}>
<div
className="w-full cursor-card"
onClick={() => {
onClick={(e) => {
if (isMobile() && entry.entries.url) {
window.open(entry.entries.url, "_blank")
e.stopPropagation()
return
}
if (iframeSrc) {
modalStack.present({
title: "",
Expand Down

0 comments on commit 0eed6d1

Please sign in to comment.