diff --git a/apps/mobile/src/components/ActionSheetComponent/index.js b/apps/mobile/src/components/ActionSheetComponent/index.js index 6d03c1c76..e4d30b498 100644 --- a/apps/mobile/src/components/ActionSheetComponent/index.js +++ b/apps/mobile/src/components/ActionSheetComponent/index.js @@ -192,7 +192,6 @@ export const ActionSheetComponent = ({ name: 'Delete', icon: 'delete', func: async () => { - try { await deleteItems(note); } catch (e) { @@ -285,7 +284,7 @@ export const ActionSheetComponent = ({ func: async () => { if (!note.id) return; if (note.type === 'note') { - if (db.notes.pinned.length === 3) { + if (db.notes.pinned.length === 3 && !note.pinned) { ToastEvent.show( 'You cannot pin more than 3 notes', 'error', @@ -295,7 +294,7 @@ export const ActionSheetComponent = ({ } await db.notes.note(note.id).pin(); } else { - if (db.notebooks.pinned.length === 3) { + if (db.notebooks.pinned.length === 3 && !note.pinned) { ToastEvent.show( 'You cannot pin more than 3 notes', 'error', @@ -520,7 +519,7 @@ export const ActionSheetComponent = ({ }} /> {!note.id && !note.dateCreated ? ( - + Start writing to save your note. ) : ( diff --git a/apps/mobile/src/components/SelectionWrapper/index.js b/apps/mobile/src/components/SelectionWrapper/index.js index c7d3af088..b5c1c40f6 100644 --- a/apps/mobile/src/components/SelectionWrapper/index.js +++ b/apps/mobile/src/components/SelectionWrapper/index.js @@ -110,13 +110,13 @@ const ActionStrip = ({note, setActionStrip}) => { if (!note.id) return; if (note.type === 'note') { - if (db.notes.pinned.length === 3) { + if (db.notes.pinned.length === 3 && !note.pinned) { ToastEvent.show('You cannot pin more than 3 notes', 'error'); return; } await db.notes.note(note.id).pin(); } else { - if (db.notebooks.pinned.length === 3) { + if (db.notebooks.pinned.length === 3 && !note.pinned) { ToastEvent.show('You cannot pin more than 3 notebooks', 'error'); return; }