refactoring of "some path" WIP

This commit is contained in:
zadam
2023-04-15 00:06:13 +02:00
parent 5e88e24693
commit 7aa26580ba
17 changed files with 193 additions and 124 deletions

View File

@@ -2,7 +2,6 @@ import server from "./server.js";
import appContext from "../components/app_context.js";
import utils from './utils.js';
import noteCreateService from './note_create.js';
import treeService from './tree.js';
import froca from "./froca.js";
// this key needs to have this value, so it's hit by the tooltip
@@ -188,7 +187,8 @@ function initNoteAutocomplete($el, options) {
templateNoteId: templateNoteId
});
suggestion.notePath = treeService.getSomeNotePath(note);
const hoistedNoteId = appContext.tabManager.getActiveContext()?.hoistedNoteId;
suggestion.notePath = note.getBestNotePathString(hoistedNoteId);
}
$el.setSelectedNotePath(suggestion.notePath);