From d8cf7c17a2b0a437cf4a2f983f5ab48fba775a64 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Sun, 25 Aug 2024 00:48:37 +0300 Subject: feature(mobile): Allow editing notes from the mobile app --- apps/mobile/components/bookmarks/BookmarkCard.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'apps/mobile/components/bookmarks') diff --git a/apps/mobile/components/bookmarks/BookmarkCard.tsx b/apps/mobile/components/bookmarks/BookmarkCard.tsx index 860e5486..ed6a3b2c 100644 --- a/apps/mobile/components/bookmarks/BookmarkCard.tsx +++ b/apps/mobile/components/bookmarks/BookmarkCard.tsx @@ -114,9 +114,21 @@ function ActionBar({ bookmark }: { bookmark: ZBookmark }) { }); } else if (nativeEvent.event === "manage_list") { manageListsSheetRef?.current?.present(); + } else if (nativeEvent.event === "edit") { + router.push(`/dashboard/add-note?bookmarkId=${bookmark.id}`); } }} actions={[ + { + id: "edit", + title: "Edit", + image: Platform.select({ + ios: "edit", + }), + attributes: { + hidden: bookmark.content.type !== BookmarkTypes.TEXT, + }, + }, { id: "archive", title: bookmark.archived ? "Un-archive" : "Archive", -- cgit v1.2.3-70-g09d2