mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-15 15:41:19 +00:00
保存优化, 自动保存优化. 不要用isDirty, 用readOnly.
保存时如果有错误, 用try cache, 避免笔记内容更改
This commit is contained in:
8
node_modules/note.js
generated
vendored
8
node_modules/note.js
generated
vendored
@@ -113,19 +113,18 @@ var Note = {
|
||||
if('Content' in updates && dbNote['Content'] != updates['Content']) {
|
||||
isDirty = true;
|
||||
// console.error(' content not same');
|
||||
|
||||
// ContentIsDirty 才会发Content
|
||||
updates['ContentIsDirty'] = true;
|
||||
|
||||
} else if('Title' in updates && dbNote['Title'] != updates['Title']) {
|
||||
isDirty = true;
|
||||
console.error(' title not same');
|
||||
// console.error(' title not same');
|
||||
} else if('Tags' in updates) {
|
||||
var dbTags = dbNote['Tags'] || [];
|
||||
var nowTags = updates['Tags'] || [];
|
||||
if(dbTags.join(',') != nowTags.join(',')) {
|
||||
isDirty = true;
|
||||
console.error(' tag not same');
|
||||
// console.error(' tag not same');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -624,9 +623,8 @@ var Note = {
|
||||
// });
|
||||
} else {
|
||||
me.inSyncContent[noteId] = false;
|
||||
console.log('not need');
|
||||
// console.log('not need');
|
||||
callback && callback(note);
|
||||
|
||||
// Web.alertWeb("NONO");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user