mirror of
https://github.com/zadam/trilium.git
synced 2024-09-20 15:45:58 +08:00
fix refreshing ribbon titles upon entity change, closes #2274
This commit is contained in:
parent
6135de8507
commit
7ec20f9384
|
@ -1,5 +1,6 @@
|
|||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||
import keyboardActionsService from "../../services/keyboard_actions.js";
|
||||
import attributeService from "../../services/attributes.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="ribbon-container">
|
||||
|
@ -261,10 +262,6 @@ export default class RibbonContainer extends NoteContextAwareWidget {
|
|||
return $ribbonComponent.hasClass("active");
|
||||
}
|
||||
|
||||
refreshRibbonContainerCommand() {
|
||||
this.refreshWithNote(this.note, true);
|
||||
}
|
||||
|
||||
ensureOwnedAttributesAreOpen(ntxId) {
|
||||
if (this.isNoteContext(ntxId) && !this.isRibbonTabActive('ownedAttributes')) {
|
||||
this.toggleRibbonTabWithName('ownedAttributes', ntxId);
|
||||
|
@ -332,6 +329,9 @@ export default class RibbonContainer extends NoteContextAwareWidget {
|
|||
|
||||
this.refresh();
|
||||
}
|
||||
else if (loadResults.getAttributes(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) {
|
||||
this.refreshWithNote(this.note, true);
|
||||
}
|
||||
}
|
||||
|
||||
getActiveRibbonWidget() {
|
||||
|
|
|
@ -297,9 +297,6 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget {
|
|||
entitiesReloadedEvent({loadResults}) {
|
||||
if (loadResults.getAttributes(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) {
|
||||
this.refresh();
|
||||
|
||||
this.getTitle(this.note);
|
||||
this.triggerCommand('refreshRibbonContainer');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue