note title widget and protected session entering fixes

This commit is contained in:
zadam
2020-05-03 22:49:20 +02:00
parent 647790885d
commit 8b5536ee3a
5 changed files with 30 additions and 25 deletions

View File

@@ -57,6 +57,10 @@ export default class NoteTitleWidget extends TabAwareWidget {
this.$noteTitle.prop("readonly", note.isProtected && !protectedSessionHolder.isProtectedSessionAvailable());
this.setProtectedStatus(note);
}
setProtectedStatus(note) {
this.$noteTitle.toggleClass("protected", !!note.isProtected);
}
@@ -88,7 +92,8 @@ export default class NoteTitleWidget extends TabAwareWidget {
entitiesReloadedEvent({loadResults}) {
if (loadResults.isNoteReloaded(this.noteId)) {
this.refresh();
// not updating the title specifically since the synced title might be older than what the user is currently typing
this.setProtectedStatus(this.note);
}
}