refreshing protected session when loading and saving protected notes

This commit is contained in:
azivner
2017-11-14 22:50:56 -05:00
parent 892aa39d46
commit 98a2322b37
2 changed files with 16 additions and 3 deletions

View File

@@ -60,6 +60,10 @@ const noteEditor = (function() {
updateNoteFromInputs(note);
await saveNoteToServer(note);
if (note.detail.is_protected) {
protected_session.touchProtectedSession();
}
}
function parseHtml(contents, note) {
@@ -196,6 +200,10 @@ const noteEditor = (function() {
await protected_session.ensureProtectedSession(currentNote.detail.is_protected, false);
if (currentNote.detail.is_protected) {
protected_session.touchProtectedSession();
}
noteDetailWrapperEl.show();
// this may fal if the dialog has not been previously opened
@@ -260,8 +268,6 @@ const noteEditor = (function() {
createNewTopLevelNote,
createNote,
setNoteBackgroundIfProtected,
setTreeBasedOnProtectedStatus,
loadNoteToEditor,
loadNote,
getCurrentNote,
getCurrentNoteId,