mirror of
https://github.com/stracker-phil/obsidian-mention-things.git
synced 2026-07-22 05:43:27 +00:00
fix: timing issue with suggestor
This commit is contained in:
parent
ebc86de6ef
commit
61efad4401
1 changed files with 4 additions and 2 deletions
6
main.js
6
main.js
|
|
@ -21,10 +21,10 @@ module.exports = class AtPeople extends Plugin {
|
|||
this.registerEvent(this.app.vault.on('delete', async event => { await this.update(event) }))
|
||||
this.registerEvent(this.app.vault.on('create', async event => { await this.update(event) }))
|
||||
this.registerEvent(this.app.vault.on('rename', async (event, originalFilepath) => { await this.update(event, originalFilepath) }))
|
||||
this.app.workspace.onLayoutReady(this.initialize)
|
||||
this.addSettingTab(new AtPeopleSettingTab(this.app, this))
|
||||
this.suggestor = new AtPeopleSuggestor(this.app, this.settings)
|
||||
this.registerEditorSuggest(this.suggestor)
|
||||
this.app.workspace.onLayoutReady(this.initialize)
|
||||
}
|
||||
|
||||
async loadSettings() {
|
||||
|
|
@ -61,7 +61,9 @@ module.exports = class AtPeople extends Plugin {
|
|||
const name = getPersonName(filename, this.settings)
|
||||
if (name) this.peopleFileMap[name] = filename
|
||||
}
|
||||
this.updatePeopleMap()
|
||||
window.setTimeout(() => {
|
||||
this.updatePeopleMap()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue