display "multiple-parents" asterisk only for multiple non-search parents

This commit is contained in:
zadam
2021-09-02 22:27:35 +02:00
parent 3e5db71652
commit 167d4816fd
3 changed files with 88 additions and 49 deletions

View File

@@ -652,7 +652,14 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
}
if (note.getParentNoteIds().length > 1) {
extraClasses.push("multiple-parents");
const notSearchParents = note.getParentNoteIds()
.map(noteId => froca.notes[noteId])
.filter(note => !!note)
.map(note => note.type !== 'search');
if (notSearchParents.length > 1) {
extraClasses.push("multiple-parents");
}
}
const cssClass = note.getCssClass();