Skip to content

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

fix: do not merge resolved notes

thecodrrdb0e723c1b50
diff --git a/packages/core/api/sync.js b/packages/core/api/sync.js
index 31ed4f894..4abcb926a 100644
--- a/packages/core/api/sync.js
+++ b/packages/core/api/sync.js
@@ -129,6 +129,8 @@ class Merger {
let localItem = await get(remoteItem.id);
if (!localItem) {
await add({ ...JSON.parse(remoteItem.data), remote: true });
+ } else if (localItem.resolved) {
+ await add({...localItem, resolved: false});
} else if (localItem.dateEdited > this._lastSynced) {
// we have a conflict
await resolve(localItem, JSON.parse(remoteItem.data));
diff --git a/packages/core/collections/notes.js b/packages/core/collections/notes.js
index 7c50a0f17..67161882d 100644
--- a/packages/core/collections/notes.js
+++ b/packages/core/collections/notes.js
@@ -107,6 +107,7 @@ export default class Notes {
headline: note.headline,
dateCreated: note.dateCreated,
conflicted: !!note.conflicted,
+ resolved: !!note.resolved
};
if (!oldNote) {