历史记录优化, 不保存一样的历史记录. ctrl+s, ctrl+e, 切换笔记都记历史

This commit is contained in:
life
2015-12-06 14:23:25 +08:00
parent 512ec39a16
commit 796bd14d15
3 changed files with 25 additions and 30 deletions

View File

@@ -89,9 +89,7 @@ define(function() {
$tpl.find('.back').click(function() {
if(confirm(getMsg("confirmBackup"))) {
// 保存当前版本
// 如果没有变化, 肯定不会保存的
// Note.curChangedSaveIt(true);
Note.curChangedSaveItForRevertHistory(function () {
Note.curChangedSaveIt(true, function () {
// 设置之
note = Note.cache[Note.curNoteId];
setEditorContent(me.list[me.curIndex].Content, note.IsMarkdown);