mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix notes not unpinned
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user