diff --git a/apps/web/src/stores/editor-store.ts b/apps/web/src/stores/editor-store.ts index 07b5a0fd1..1a4693ee6 100644 --- a/apps/web/src/stores/editor-store.ts +++ b/apps/web/src/stores/editor-store.ts @@ -146,7 +146,8 @@ class EditorStore extends BaseStore { return; } - const note = await db.notes.note(noteId); // TODO: || db.notes.trashed(noteId); + const note = + (await db.notes.note(noteId)) || (await db.notes.trashed(noteId)); if (!note) return; noteStore.setSelectedNote(note.id); @@ -173,11 +174,11 @@ class EditorStore extends BaseStore { attachmentsLength: 0 // TODO: db.attachments.ofNote(note.id, "all")?.length || 0 }; - // TODO: const isDeleted = note.type === "trash"; - // if (isDeleted) { - // state.session.isDeleted = true; - // state.session.readonly = true; - // } + const isDeleted = note.type === "trash"; + if (isDeleted) { + state.session.isDeleted = true; + state.session.readonly = true; + } }); appStore.setIsEditorOpen(true); this.toggleProperties(false);