mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-22 03:44:50 +00:00
change notebook status: dirty, new
This commit is contained in:
10
node_modules/notebook.js
generated
vendored
10
node_modules/notebook.js
generated
vendored
@@ -434,6 +434,7 @@ var Notebook = {
|
||||
var me = this;
|
||||
|
||||
// 服务器没有, 但是是发送更新的, 所以需要作为添加
|
||||
// 情况很少见
|
||||
if(notebookSyncInfo.changeNeedAdds) {
|
||||
var needAddNotebooks = notebookSyncInfo.changeNeedAdds;
|
||||
for(var i in needAddNotebooks) {
|
||||
@@ -442,6 +443,7 @@ var Notebook = {
|
||||
}
|
||||
}
|
||||
|
||||
// pull
|
||||
// 处理添加的, 更新的, 这里前端统一重新渲染!!
|
||||
var adds = notebookSyncInfo.adds;
|
||||
if (!isEmpty(adds) || !isEmpty(notebookSyncInfo.updates)) {
|
||||
@@ -452,11 +454,15 @@ var Notebook = {
|
||||
Web.reloadNotebook();
|
||||
}
|
||||
|
||||
// push
|
||||
if (!isEmpty(notebookSyncInfo.changeAdds)) {
|
||||
console.log(' has changeAdds notebook')
|
||||
console.log(notebookSyncInfo.changeAdds)
|
||||
console.log(' has changeAdds notebook', notebookSyncInfo.changeAdds);
|
||||
Web.addChangeNotebook(notebookSyncInfo.changeAdds);
|
||||
}
|
||||
if (!isEmpty(notebookSyncInfo.changeUpdates)) {
|
||||
console.log(' has changeUpdates notebook', notebookSyncInfo.changeUpdates);
|
||||
Web.updateChangeNotebook(notebookSyncInfo.changeUpdates);
|
||||
}
|
||||
|
||||
if (!isEmpty(notebookSyncInfo.deletes)) {
|
||||
// 处理删除的
|
||||
|
Reference in New Issue
Block a user