删除垃圾不用减少数量

This commit is contained in:
life
2015-12-06 14:39:33 +08:00
parent f1be042b5e
commit 6b97ad0fc9

View File

@@ -498,7 +498,7 @@ Note.curChangedSaveIt = function(force, callback) {
}, force);
return hasChanged;
} else {
// 如果是强制的, 则要加历史, 但因笔记内容没改, 所以之前不会有
if (force) {
@@ -1411,8 +1411,10 @@ Note.deleteNote = function(target, contextmenuItem, isShared) {
// 取消star
Note.unStar(noteId);
// 减少数量
Notebook.minusNotebookNumberNotes(note.NotebookId);
if (!note.IsTrash) {
// 减少数量
Notebook.minusNotebookNumberNotes(note.NotebookId);
}
Note.clearCacheByNotebookId(note.NotebookId);
delete Note.cache[noteId];
}