mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 16:55:50 +01:00
improved heuristic of displaing attributes in note list and tooltips #1558
This commit is contained in:
@@ -479,6 +479,20 @@ class NoteShort {
|
||||
return relations.map(rel => this.treeCache.notes[rel.value]);
|
||||
}
|
||||
|
||||
getPromotedDefinitionAttributes() {
|
||||
if (this.hasLabel('hidePromotedAttributes')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return this.getAttributes()
|
||||
.filter(attr => attr.isDefinition())
|
||||
.filter(attr => {
|
||||
const def = attr.getDefinition();
|
||||
|
||||
return def && def.isPromoted;
|
||||
});
|
||||
}
|
||||
|
||||
hasAncestor(ancestorNote) {
|
||||
if (this.noteId === ancestorNote.noteId) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user