Registering events sooner
This commit is contained in:
@@ -64,7 +64,6 @@ export default class OmnisearchPlugin extends Plugin {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
app.workspace.onLayoutReady(async () => {
|
|
||||||
// Listeners to keep the search index up-to-date
|
// Listeners to keep the search index up-to-date
|
||||||
this.registerEvent(
|
this.registerEvent(
|
||||||
this.app.vault.on('create', async file => {
|
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()
|
await this.populateIndex()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.executeFirstLaunchTasks()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
executeFirstLaunchTasks(): void {
|
executeFirstLaunchTasks(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user