use lazy title loading in bookmarks buttons to have decrypted title upon protected session start, #2393

This commit is contained in:
zadam
2021-12-19 10:36:48 +01:00
parent 1aff42f453
commit e29aee1aae
2 changed files with 10 additions and 2 deletions

View File

@@ -18,7 +18,12 @@ export default class OpenNoteButtonWidget extends ButtonWidget {
}
this.icon(note.getIcon());
this.title(note.title);
this.title(() => {
const n = froca.getNoteFromCache(noteId);
// always fresh, always decoded (when protected session is available)
return n.title;
});
this.refreshIcon();
});