yet another refactoring of working with note's payload/content

This commit is contained in:
zadam
2019-03-26 22:24:04 +01:00
parent 4bdcf32475
commit 29c60581a6
31 changed files with 126 additions and 239 deletions

View File

@@ -117,10 +117,7 @@ async function saveNote() {
}
note.title = $noteTitle.val();
if (note.noteContent != null) { // might be null for file/image
note.noteContent.content = getActiveNoteContent(note);
}
note.content = getActiveNoteContent(note);
// it's important to set the flag back to false immediatelly after retrieving title and content
// otherwise we might overwrite another change (especially async code)