chore: refactor code

This commit is contained in:
Daniel Bauer
2024-12-13 13:47:41 +01:00
parent ed87be0e99
commit 53436f2c42
2 changed files with 57 additions and 29 deletions

View File

@@ -23,7 +23,7 @@ export default class DataviewAutocompletePlugin extends Plugin {
this.registerEvent(
// @ts-ignore
this.app.metadataCache.on("dataview:index-ready", () => {
this.suggester.buildNewIndex();
this.suggester.onDataviewIndexReady();
}),
);
@@ -32,7 +32,11 @@ export default class DataviewAutocompletePlugin extends Plugin {
// @ts-ignore
"dataview:metadata-change",
(type: string, file: TFile, oldPath?: string) => {
this.suggester.onMetadataChange(type, file, oldPath);
this.suggester.onDataviewMetadataChange(
type,
file,
oldPath,
);
},
),
);