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