reloading notes after script changes

This commit is contained in:
zadam
2019-10-20 12:29:34 +02:00
parent 78f5b7b288
commit 2305ad7405
21 changed files with 115 additions and 82 deletions

View File

@@ -70,13 +70,13 @@ async function enterProtectedSessionOnServer(password) {
}
async function protectNoteAndSendToServer() {
if (!noteDetailService.getActiveNote() || noteDetailService.getActiveNote().isProtected) {
if (!noteDetailService.getActiveTabNote() || noteDetailService.getActiveTabNote().isProtected) {
return;
}
await enterProtectedSession();
const note = noteDetailService.getActiveNote();
const note = noteDetailService.getActiveTabNote();
note.isProtected = true;
await noteDetailService.getActiveTabContext().saveNote();
@@ -87,7 +87,7 @@ async function protectNoteAndSendToServer() {
}
async function unprotectNoteAndSendToServer() {
const activeNote = noteDetailService.getActiveNote();
const activeNote = noteDetailService.getActiveTabNote();
if (!activeNote.isProtected) {
toastService.showAndLogError(`Note ${activeNote.noteId} is not protected`);