Mercurial > obsidian-remember-file-state
changeset 51:e932f1b73133
Pass `this` as the context for various callbacks.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 02 Oct 2023 10:04:13 -0700 |
parents | 1fe2cd2c603f |
children | 586f857a98dd |
files | src/main.ts |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main.ts Mon Oct 02 10:02:54 2023 -0700 +++ b/src/main.ts Mon Oct 02 10:04:13 2023 -0700 @@ -126,10 +126,10 @@ await this.readStateDatabase(STATE_DB_PATH); - this.registerEvent(this.app.workspace.on('file-open', this.onFileOpen)); - this.registerEvent(this.app.workspace.on('quit', this.onAppQuit)); - this.registerEvent(this.app.vault.on('rename', this.onFileRename)); - this.registerEvent(this.app.vault.on('delete', this.onFileDelete)); + this.registerEvent(this.app.workspace.on('file-open', this.onFileOpen, this)); + this.registerEvent(this.app.workspace.on('quit', this.onAppQuit, this)); + this.registerEvent(this.app.vault.on('rename', this.onFileRename, this)); + this.registerEvent(this.app.vault.on('delete', this.onFileDelete, this)); this.app.workspace.onLayoutReady(() => { this.onLayoutReady(); });