Merge remote-tracking branch 'origin/stable'

# Conflicts:
#	src/public/app/dialogs/options/other.js
This commit is contained in:
zadam
2021-12-19 10:54:30 +01:00
7 changed files with 45 additions and 16 deletions

View File

@@ -44,7 +44,10 @@ export default class ButtonWidget extends NoteContextAwareWidget {
this.$widget.tooltip({
html: true,
title: () => {
const title = this.settings.title;
const title = typeof this.settings.title === "function"
? this.settings.title()
: this.settings.title;
const action = actions.find(act => act.actionName === this.settings.command);
if (action && action.effectiveShortcuts.length > 0) {

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();
});