mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-15 15:41:19 +00:00
Not need to render at Full sync
This commit is contained in:
4
node_modules/sync.js
generated
vendored
4
node_modules/sync.js
generated
vendored
@@ -654,6 +654,9 @@ var Sync = {
|
||||
// mainType == notebook, note, tag
|
||||
// type = changeAdds, changeConflicts, adds, deletes, updates, conflicts, errors,
|
||||
fixSynced: function (mainType, type, data) {
|
||||
if (this.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var o = {};
|
||||
if (!Common.isArray(data)) {
|
||||
data = [data];
|
||||
@@ -738,6 +741,7 @@ var Sync = {
|
||||
setSyncFinished: function(hasError) {
|
||||
var me = this;
|
||||
me.incrSyncStart = false;
|
||||
me.fullSyncStart = false;
|
||||
// Web.syncProgress(0);
|
||||
Web.syncFinished(hasError);
|
||||
},
|
||||
|
56
node_modules/web.js
generated
vendored
56
node_modules/web.js
generated
vendored
@@ -40,26 +40,44 @@ var Web = {
|
||||
},
|
||||
|
||||
reloadNotebook: function () {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
this.Notebook.reload();
|
||||
},
|
||||
|
||||
addSyncNotebook: function(notebooks) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Notebook.addSync(notebooks);
|
||||
},
|
||||
updateSyncNotebook: function(notebooks) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Notebook.updateSync(notebooks);
|
||||
},
|
||||
deleteSyncNotebook: function(notebooks) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Notebook.deleteSync(notebooks);
|
||||
},
|
||||
addChangeNotebook: function(notebooks) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Notebook.addChanges(notebooks);
|
||||
},
|
||||
updateChangeNotebook: function (notebooks) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
this.Notebook.updateChanges(notebooks);
|
||||
},
|
||||
/*
|
||||
@@ -71,10 +89,16 @@ var Web = {
|
||||
|
||||
//----------
|
||||
addSyncNote: function(notes) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Note.addSync(notes);
|
||||
},
|
||||
updateSyncNote: function(notes) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Note.updateSync(notes);
|
||||
},
|
||||
@@ -83,22 +107,37 @@ var Web = {
|
||||
me.Note.updateErrors(notes);
|
||||
},
|
||||
updateChangeUpdates: function (notes) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Note.updateChangeUpdates(notes);
|
||||
},
|
||||
updateChangeAdds: function (notes) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Note.updateChangeAdds(notes);
|
||||
},
|
||||
deleteSyncNote: function(notes) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Note.deleteSync(notes);
|
||||
},
|
||||
fixSyncConflictNote: function(note, newNote) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Note.fixSyncConflict(note, newNote);
|
||||
},
|
||||
updateNoteCacheForServer: function(notes) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Note.updateNoteCacheForServer(notes);
|
||||
},
|
||||
@@ -118,6 +157,9 @@ var Web = {
|
||||
|
||||
//
|
||||
addOrDeleteTagFromSync: function(tagSyncInfo) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
// console.log("是啊");
|
||||
// console.error(tagSyncInfo);
|
||||
@@ -127,13 +169,19 @@ var Web = {
|
||||
me.Tag.nav.deleteTags(deletes);
|
||||
},
|
||||
|
||||
addTag: function(tag) {
|
||||
addTag: function(tag) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Tag.addTagNav(tag);
|
||||
},
|
||||
|
||||
// 内容同步成功
|
||||
contentSynced: function(noteId, content) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
if(noteId) {
|
||||
me.Note.contentSynced(noteId, content);
|
||||
@@ -142,6 +190,9 @@ var Web = {
|
||||
|
||||
// 通过attach已同步成功
|
||||
attachSynced: function(attachs, attach, noteId) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Attach.attachSynced(attachs, attach, noteId);
|
||||
},
|
||||
@@ -175,6 +226,9 @@ var Web = {
|
||||
|
||||
// 重新统计后, 显示到web上
|
||||
updateNotebookNumberNotes: function(notebookId, count) {
|
||||
if (SyncService.fullSyncStart) {
|
||||
return;
|
||||
}
|
||||
var me = this;
|
||||
me.Notebook && me.Notebook.updateNotebookNumberNotes(notebookId, count);
|
||||
}
|
||||
|
Reference in New Issue
Block a user