better autosave - only once per 5 seconds with guaranteed save when changing notes

This commit is contained in:
azivner
2017-08-16 20:41:41 -04:00
parent 11742bba58
commit bcc4f22cf5
4 changed files with 27 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ $(function(){
const node = data.node.data;
const noteId = node.is_clone ? node.note_clone_id : node.note_id;
loadNote(noteId);
saveNoteIfChanged(() => loadNote(noteId));
},
expand: function(event, data) {
setExpanded(data.node.key, true);