Registering events sooner

This commit is contained in:
Simon Cambier
2023-01-19 08:37:43 +01:00
parent 8942e662d6
commit ebee93a2aa

View File

@@ -64,7 +64,6 @@ export default class OmnisearchPlugin extends Plugin {
},
})
app.workspace.onLayoutReady(async () => {
// Listeners to keep the search index up-to-date
this.registerEvent(
this.app.vault.on('create', async file => {
@@ -99,10 +98,10 @@ export default class OmnisearchPlugin extends Plugin {
})
)
app.workspace.onLayoutReady(async () => {
this.executeFirstLaunchTasks()
await this.populateIndex()
})
this.executeFirstLaunchTasks()
}
executeFirstLaunchTasks(): void {