Skip to content

Commit

Permalink
note list should show the prefix, #4362
Browse files Browse the repository at this point in the history
  • Loading branch information
zadam committed Oct 28, 2023
1 parent 48e98b2 commit eb0a68d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/public/app/services/note_list_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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")
)
Expand Down
2 changes: 1 addition & 1 deletion src/public/app/services/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}
}
Expand Down

0 comments on commit eb0a68d

Please sign in to comment.