aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile/components/bookmarks
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-08-25 00:48:37 +0300
committerMohamedBassem <me@mbassem.com>2024-08-25 00:52:15 +0300
commitd8cf7c17a2b0a437cf4a2f983f5ab48fba775a64 (patch)
tree7732dbb08a5272b11a5e4c8c638b25110c65c33a /apps/mobile/components/bookmarks
parent6fba4aac850c831365e61954c49f653401da33bb (diff)
downloadkarakeep-d8cf7c17a2b0a437cf4a2f983f5ab48fba775a64.tar.zst
feature(mobile): Allow editing notes from the mobile app
Diffstat (limited to 'apps/mobile/components/bookmarks')
-rw-r--r--apps/mobile/components/bookmarks/BookmarkCard.tsx12
1 files changed, 12 insertions, 0 deletions
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,10 +114,22 @@ 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",
image: Platform.select({