From a00cdc59edb0e19b6433a584e43cd6faf2287e52 Mon Sep 17 00:00:00 2001 From: Wanxp <977741432@qq.com> Date: Tue, 27 Dec 2022 17:27:08 +0800 Subject: [PATCH] add variable: yearPublished --- package-lock.json | 2 +- src/org/wanxp/file/FileHandler.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2088610..b8adf59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "obsidian-douban-plugin", - "version": "1.7.8", + "version": "1.7.9", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/org/wanxp/file/FileHandler.ts b/src/org/wanxp/file/FileHandler.ts index 5a30d4b..4a61813 100644 --- a/src/org/wanxp/file/FileHandler.ts +++ b/src/org/wanxp/file/FileHandler.ts @@ -136,7 +136,7 @@ export default class FileHandler { const File = await vault.create(filePath, data); // Create the file and open it in the active leaf if (showAfterCreate) { - const leaf = this._app.workspace.splitLeafOrActive(); + const leaf = this._app.workspace.getRightLeaf(true); await leaf.openFile(File); } return true; @@ -170,7 +170,7 @@ export default class FileHandler { // Create the file and open it in the active leaf if (showAfterSuccess) { - const leaf = this._app.workspace.splitLeafOrActive(); + const leaf = this._app.workspace.getRightLeaf(true); await leaf.openFile(File); } return fileExists;