diff --git a/src/main.ts b/src/main.ts index ca79eb1..2fb5e8d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -90,7 +90,6 @@ export default class FolderFileSplitterPlugin extends Plugin { }; onunload() { - this.detachFileTreeLeafs(); this.app.vault.off("create", this.onCreate); this.app.vault.off("modify", this.onModify); this.app.vault.off("delete", this.onDelete); @@ -119,17 +118,4 @@ export default class FolderFileSplitterPlugin extends Plugin { async saveSettings() { await this.saveData(this.settings); } - - detachFileTreeLeafs = () => { - const leafs = this.app.workspace.getLeavesOfType(this.VIEW_TYPE); - for (const leaf of leafs) { - (leaf.view as FileTreeView).destroy(); - leaf.detach(); - } - }; - - refreshTreeLeafs = (showAfterAttach: boolean) => { - this.detachFileTreeLeafs(); - this.openFileTreeLeaf(showAfterAttach); - }; }