避免trash的笔记一同步变成不是trash的了

This commit is contained in:
life
2015-11-01 11:04:47 +08:00
parent 91bc298d94
commit 580220eee4
2 changed files with 38 additions and 18 deletions

12
node_modules/note.js generated vendored
View File

@@ -704,13 +704,19 @@ var Note = {
note.InitSync = true; // 刚同步完, 表示content, images, attach没有同步
note.IsDirty = false;
note.LocalIsDelete = false;
note.IsTrash = false;
// 这里, 悲剧, 一个大BUG, 应该和server端IsTrash一致,
// 不然同步的时候将IsTrash的笔记同步到非IsTrash, 2015/10/31 fixed 谢谢 3601提供的信息
// note.IsTrash = false;
if (typeof note.IsTrash == 'boolean') {
note.IsTrash = note.IsTrash;
}
else {
note.IsTrash = false;
}
note.ServerNoteId = note.NoteId;
note.NoteId = Common.objectId();
console.error('add note force' + note.Title + Common.goNowToDate(note.CreatedTime));
note.CreatedTime = Common.goNowToDate(note.CreatedTime);
note.UpdatedTime = Common.goNowToDate(note.UpdatedTime);