aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile/app/sharing.tsx
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2025-03-16 12:47:19 +0000
committerMohamedBassem <me@mbassem.com>2025-03-16 12:48:20 +0000
commit40fb401034b5a12a9346e0ab9d2505fb2fb92083 (patch)
tree0f6215a9dae0d702a1ca309b92b53aeb89eafe96 /apps/mobile/app/sharing.tsx
parentc388fb2caecfecab27c50659969738890e1021cd (diff)
downloadkarakeep-40fb401034b5a12a9346e0ab9d2505fb2fb92083.tar.zst
fix(mobile): Fix shared links getting stored as text. #956
Diffstat (limited to 'apps/mobile/app/sharing.tsx')
-rw-r--r--apps/mobile/app/sharing.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/mobile/app/sharing.tsx b/apps/mobile/app/sharing.tsx
index e2e1823b..55c2da9d 100644
--- a/apps/mobile/app/sharing.tsx
+++ b/apps/mobile/app/sharing.tsx
@@ -42,7 +42,9 @@ function SaveBookmark({ setMode }: { setMode: (mode: Mode) => void }) {
if (isLoading) {
return;
}
- if (!isPending && shareIntent?.text) {
+ if (!isPending && shareIntent.webUrl) {
+ mutate({ type: BookmarkTypes.LINK, url: shareIntent.webUrl });
+ } else if (!isPending && shareIntent?.text) {
const val = z.string().url();
if (val.safeParse(shareIntent.text).success) {
// This is a URL, else treated as text