A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
core: stop localOnly items from always getting synced
Abdullah Atta4ee0071eca55
diff --git a/packages/core/src/api/sync/collector.js b/packages/core/src/api/sync/collector.jsindex aa033b01a..e1ad3fa5e 100644--- a/packages/core/src/api/sync/collector.js+++ b/packages/core/src/api/sync/collector.js@@ -136,19 +136,20 @@ function filterSyncableItems(items, lastSyncedTimestamp, isForceSync) {// synced is a local only propertydelete item.synced;- if (item.localOnly) {+ if (isUnsynced && isSyncable) {ids.push(item.id);syncableItems.push(- JSON.stringify({- id: item.id,- deleted: true,- dateModified: item.dateModified,- deleteReason: "localOnly"- })+ JSON.stringify(+ item.localOnly+ ? {+ id: item.id,+ deleted: true,+ dateModified: item.dateModified,+ deleteReason: "localOnly"+ }+ : item+ ));- } else if (isUnsynced && isSyncable) {- ids.push(item.id);- syncableItems.push(JSON.stringify(item));}}return { items: syncableItems, ids };