note list should show the prefix, #4362

This commit is contained in:
zadam 2023-10-29 01:02:55 +02:00
parent 48e98b2ac3
commit eb0a68d0ab
2 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@ import contentRenderer from "./content_renderer.js";
import froca from "./froca.js";
import attributeRenderer from "./attribute_renderer.js";
import libraryLoader from "./library_loader.js";
import treeService from "./tree.js";
const TPL = `
<div class="note-list">
@ -294,7 +295,7 @@ class NoteListRenderer {
.append($expander)
.append($('<span class="note-icon">').addClass(note.getIcon()))
.append(this.viewType === 'grid'
? $('<span class="note-book-title">').text(note.title)
? $('<span class="note-book-title">').text(await treeService.getNoteTitle(note.noteId, this.parentNote.noteId))
: (await linkService.createLink(notePath, {showTooltip: false, showNotePath: this.showNotePath}))
.addClass("note-book-title")
)

View File

@ -217,7 +217,7 @@ async function getNoteTitle(noteId, parentNoteId = null) {
if (branchId) {
const branch = froca.getBranch(branchId);
if (branch && branch.prefix) {
if (branch?.prefix) {
title = `${branch.prefix} - ${title}`;
}
}