From cddae8ffd2a966d938f56bb387a32f103f8a2888 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Sun, 8 Sep 2024 19:01:04 +0100
Subject: feature(mobile): Show the view bookmark modal for links as well

---
 apps/mobile/components/bookmarks/BookmarkCard.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'apps/mobile/components/bookmarks/BookmarkCard.tsx')

diff --git a/apps/mobile/components/bookmarks/BookmarkCard.tsx b/apps/mobile/components/bookmarks/BookmarkCard.tsx
index 0b787372..14eb3cf3 100644
--- a/apps/mobile/components/bookmarks/BookmarkCard.tsx
+++ b/apps/mobile/components/bookmarks/BookmarkCard.tsx
@@ -9,7 +9,6 @@ import {
   View,
 } from "react-native";
 import * as Haptics from "expo-haptics";
-import * as WebBrowser from "expo-web-browser";
 import useAppSettings from "@/lib/settings";
 import { api } from "@/lib/trpc";
 import { BottomSheetModal } from "@gorhom/bottom-sheet";
@@ -176,6 +175,7 @@ function TagList({ bookmark }: { bookmark: ZBookmark }) {
 
 function LinkCard({
   bookmark,
+  onOpenBookmark,
 }: {
   bookmark: ZBookmark;
   onOpenBookmark: () => void;
@@ -221,11 +221,11 @@ function LinkCard({
 
   return (
     <View className="flex gap-2">
-      {imageComp}
+      <Pressable onPress={onOpenBookmark}>{imageComp}</Pressable>
       <View className="flex gap-2 p-2">
         <Text
           className="line-clamp-2 text-xl font-bold text-foreground"
-          onPress={() => WebBrowser.openBrowserAsync(url)}
+          onPress={onOpenBookmark}
         >
           {bookmark.title ?? bookmark.content.title ?? parsedUrl.host}
         </Text>
-- 
cgit v1.2.3-70-g09d2

