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

@@ -133,6 +133,12 @@ const protected_session = (function() {
noteEditor.setNoteBackgroundIfProtected(note);
}
function touchProtectedSession() {
if (isProtectedSessionAvailable()) {
lastProtectedSessionOperationDate = new Date();
}
}
passwordFormEl.submit(() => {
setupProtectedSession();
@@ -152,6 +158,7 @@ const protected_session = (function() {
isProtectedSessionAvailable,
protectNoteAndSendToServer,
unprotectNoteAndSendToServer,
getProtectedSessionId
getProtectedSessionId,
touchProtectedSession
};
})();