refactoring/cleanup

This commit is contained in:
zadam
2019-05-21 20:24:40 +02:00
parent ff5ea8b311
commit 3fe9218ea8
8 changed files with 47 additions and 63 deletions

View File

@@ -192,13 +192,17 @@ class TabContext {
return this.components[type];
}
async activate() {
await this.tabRow.activateTab(this.$tab[0]);
}
async saveNote() {
if (this.note.isProtected && !protectedSessionHolder.isProtectedSessionAvailable()) {
return;
}
this.note.title = this.$noteTitle.val();
this.note.content = noteDetailService.getActiveNoteContent();
this.note.content = this.getComponent().getContent();
// 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)