From 4a247b752e8652abf409775bc8008482a9546ad3 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Wed, 13 Mar 2024 03:10:06 +0000
Subject: fix(mobile): Fix invalidation after the sharing and add a placeholder
 image

---
 packages/mobile/app/sharing.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'packages/mobile/app/sharing.tsx')

diff --git a/packages/mobile/app/sharing.tsx b/packages/mobile/app/sharing.tsx
index 89f1a168..5fb5ef8e 100644
--- a/packages/mobile/app/sharing.tsx
+++ b/packages/mobile/app/sharing.tsx
@@ -28,12 +28,12 @@ function SaveBookmark({ setMode }: { setMode: (mode: Mode) => void }) {
   useEffect(() => {
     if (!isPending && shareIntent?.text) {
       mutate({ type: "link", url: shareIntent.text });
-      invalidateAllBookmarks();
     }
   }, []);
 
   const { mutate, isPending } = api.bookmarks.createBookmark.useMutation({
     onSuccess: (d) => {
+      invalidateAllBookmarks();
       setMode({ type: "success", bookmarkId: d.id });
     },
     onError: () => {
-- 
cgit v1.2.3-70-g09d2

