From cd33ccc3243989a41c3b8564f52e45dfa1f5d56c Mon Sep 17 00:00:00 2001 From: Xu Quan Date: Thu, 9 Jan 2025 23:14:00 +0800 Subject: [PATCH] feat: open file tree leaf when workspace layout ready --- src/main.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index e617420..9c76b76 100644 --- a/src/main.ts +++ b/src/main.ts @@ -28,7 +28,10 @@ export default class AppleStyleNotesPlugin extends Plugin { callback: async () => await this.openFileTreeLeaf(true), }); - } + this.app.workspace.onLayoutReady(async () => { + await this.openFileTreeLeaf(true); + }); + } onunload() {