Merge branch 'master' of github.com:standardnotes/web into sfv3
This commit is contained in:
@@ -193,8 +193,21 @@ class SyncManager {
|
||||
this.$interval.cancel(this.syncStatus.checker);
|
||||
}
|
||||
|
||||
lockSyncing() {
|
||||
this.syncLocked = true;
|
||||
}
|
||||
|
||||
unlockSyncing() {
|
||||
this.syncLocked = false;
|
||||
}
|
||||
|
||||
sync(callback, options = {}, source) {
|
||||
|
||||
if(this.syncLocked) {
|
||||
console.log("Sync Locked, Returning;");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!options) options = {};
|
||||
|
||||
if(typeof callback == 'string') {
|
||||
@@ -475,7 +488,7 @@ class SyncManager {
|
||||
// We want a new uuid for the new item. Note that this won't neccessarily adjust references.
|
||||
itemResponse.uuid = null;
|
||||
|
||||
var dup = this.modelManager.createDuplicateItem(itemResponse, item);
|
||||
var dup = this.modelManager.createDuplicateItem(itemResponse);
|
||||
if(!itemResponse.deleted && !item.isItemContentEqualWith(dup)) {
|
||||
this.modelManager.addItem(dup);
|
||||
dup.conflict_of = item.uuid;
|
||||
|
||||
Reference in New Issue
Block a user