better protected/unprotected note indicator, fixes #110

This commit is contained in:
azivner
2018-06-02 11:47:16 -04:00
parent 31b76b23ce
commit 083cccea28
6 changed files with 28 additions and 18 deletions

View File

@@ -105,6 +105,10 @@ async function enterProtectedSessionOnServer(password) {
}
async function protectNoteAndSendToServer() {
if (noteDetailService.getCurrentNote().isProtected) {
return;
}
await ensureProtectedSession(true, true);
const note = noteDetailService.getCurrentNote();
@@ -118,6 +122,10 @@ async function protectNoteAndSendToServer() {
}
async function unprotectNoteAndSendToServer() {
if (!noteDetailService.getCurrentNote().isProtected) {
return;
}
await ensureProtectedSession(true, true);
const note = noteDetailService.getCurrentNote();