use just note title in note autocomplete input field

This commit is contained in:
zadam
2020-09-03 17:38:11 +02:00
parent a37fa0cb3f
commit 42ecc0e15b
4 changed files with 15 additions and 6 deletions

View File

@@ -57,12 +57,16 @@ function getRecentNotes(activeNoteId) {
LIMIT 200`, params);
return recentNotes.map(rn => {
const title = noteCacheService.getNoteTitleForPath(rn.notePath.split('/'));
const notePathArray = rn.notePath.split('/');
const noteTitle = noteCacheService.getNoteTitle(notePathArray[notePathArray.length - 1]);
const notePathTitle = noteCacheService.getNoteTitleForPath(notePathArray);
return {
notePath: rn.notePath,
notePathTitle: title,
highlightedNotePathTitle: utils.escapeHtml(title)
noteTitle,
notePathTitle,
highlightedNotePathTitle: utils.escapeHtml(notePathTitle)
};
});
}