mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
simplification of tree cache
This commit is contained in:
@@ -59,10 +59,14 @@ async function getNoteTitle(noteId, parentNoteId = null) {
|
||||
let {title} = note;
|
||||
|
||||
if (parentNoteId !== null) {
|
||||
const branch = await treeCache.getBranchByChildParent(noteId, parentNoteId);
|
||||
const branchId = note.parentToBranch[parentNoteId];
|
||||
|
||||
if (branch && branch.prefix) {
|
||||
title = branch.prefix + ' - ' + title;
|
||||
if (branchId) {
|
||||
const branch = await treeCache.getBranch(branchId);
|
||||
|
||||
if (branch && branch.prefix) {
|
||||
title = branch.prefix + ' - ' + title;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user