diff --git a/apps/mobile/src/modules/entry-list/templates/EntryVideoItem.tsx b/apps/mobile/src/modules/entry-list/templates/EntryVideoItem.tsx index c36826f0a..ecd524482 100644 --- a/apps/mobile/src/modules/entry-list/templates/EntryVideoItem.tsx +++ b/apps/mobile/src/modules/entry-list/templates/EntryVideoItem.tsx @@ -2,7 +2,7 @@ import { FeedViewType } from "@follow/constants" import { tracker } from "@follow/tracker" import { transformVideoUrl } from "@follow/utils" import { memo } from "react" -import { Linking, View } from "react-native" +import { Linking, Text, View } from "react-native" import { getGeneralSettings } from "@/src/atoms/settings/general" import { Image } from "@/src/components/ui/image/Image" @@ -19,10 +19,12 @@ import { EntryGridFooter } from "../../entry-content/EntryGridFooter" export const EntryVideoItem = memo(({ id }: { id: string }) => { const item = useEntry(id) - if (!item || !item.media) { + if (!item) { return null } + const imageUrl = item.media?.at(0)?.url + return ( @@ -42,14 +44,18 @@ export const EntryVideoItem = memo(({ id }: { id: string }) => { openVideo(item.url) }} > - + {imageUrl ? ( + + ) : ( + + )} @@ -59,6 +65,15 @@ export const EntryVideoItem = memo(({ id }: { id: string }) => { EntryVideoItem.displayName = "EntryVideoItem" +const FallbackMedia = () => ( + + No media available + +) + const parseSchemeLink = (url: string) => { let urlObject: URL try {