fix: use full path when searching autocomplete tags

This commit is contained in:
Mo
2022-02-09 11:09:11 -06:00
parent 0c3d1fce0c
commit 78ec092bf0
3 changed files with 19 additions and 29 deletions

View File

@@ -217,20 +217,10 @@ export class NoteTagsState {
}
getPrefixTitle(tag: SNTag): string | undefined {
const hierarchy = this.application.getTagParentChain(tag);
if (hierarchy.length === 0) {
return undefined;
}
const prefixTitle = hierarchy.map((tag) => tag.title).join('/');
return `${prefixTitle}/`;
return this.application.getTagPrefixTitle(tag);
}
getLongTitle(tag: SNTag): string {
const hierarchy = this.application.getTagParentChain(tag);
const tags = [...hierarchy, tag];
const longTitle = tags.map((tag) => tag.title).join('/');
return longTitle;
return this.application.getTagLongTitle(tag);
}
}