Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

core: duplicating a note should copy all the flags (#9250)

Chloe Oletto3f0c24d27bb6
diff --git a/packages/core/src/collections/notes.ts b/packages/core/src/collections/notes.ts
index ad5c868e5..f56f6c645 100644
--- a/packages/core/src/collections/notes.ts
+++ b/packages/core/src/collections/notes.ts
@@ -177,6 +177,7 @@ export class Notes implements ICollection {
localOnly: item.localOnly,
conflicted: item.conflicted,
readonly: item.readonly,
+ archived: item.archived,
dateCreated: item.dateCreated,
dateEdited: item.dateEdited || dateEdited,
@@ -197,6 +198,7 @@ export class Notes implements ICollection {
localOnly: item.localOnly,
conflicted: item.conflicted,
readonly: item.readonly,
+ archived: item.archived,
dateCreated: item.dateCreated || Date.now(),
dateEdited: item.dateEdited || dateEdited || Date.now(),
@@ -432,9 +434,7 @@ export class Notes implements ICollection {
const duplicateId = await this.db.notes.add({
...clone(note),
id: undefined,
- readonly: false,
- favorite: false,
- pinned: false,
+ isGeneratedTitle: false,
contentId: undefined,
title: note.title + " (Copy)",
dateEdited: undefined,