listen to rename

This commit is contained in:
fyears 2024-06-15 16:09:07 +08:00
parent 157eff3a61
commit 52d46b58d8

View File

@ -1589,12 +1589,14 @@ export default class RemotelySavePlugin extends Plugin {
this.registerEvent(this.app.vault.on("modify", this._syncOnSaveEvent2));
this.registerEvent(this.app.vault.on("create", this._syncOnSaveEvent2));
this.registerEvent(this.app.vault.on("delete", this._syncOnSaveEvent2));
this.registerEvent(this.app.vault.on("rename", this._syncOnSaveEvent2));
});
} else {
this.syncEvent?.off("SYNC_DONE", this._syncOnSaveEvent1);
this.app.vault.off("modify", this._syncOnSaveEvent2);
this.app.vault.off("create", this._syncOnSaveEvent2);
this.app.vault.off("delete", this._syncOnSaveEvent2);
this.app.vault.off("rename", this._syncOnSaveEvent2);
}
}