From 57b1cd8ae2404c71e261826512c2cb1d3f67f7ad Mon Sep 17 00:00:00 2001 From: SebastianMC Date: Thu, 29 Sep 2022 10:01:10 +0200 Subject: [PATCH] Bugfix for #17 - plugin closes most recent tab Version bump for release --- manifest.json | 2 +- package.json | 2 +- src/main.ts | 2 +- versions.json | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 5977a4f..74baf9b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "custom-sort", "name": "Custom File Explorer sorting", - "version": "0.7.2", + "version": "0.8.1", "minAppVersion": "0.15.0", "description": "Allows for manual and automatic, config-driven reordering and sorting of files and folders in File Explorer", "author": "SebastianMC ", diff --git a/package.json b/package.json index 65a1045..fdb4715 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-custom-sort", - "version": "0.7.2", + "version": "0.8.1", "description": "Custom Sort plugin for Obsidian (https://obsidian.md)", "main": "main.js", "scripts": { diff --git a/src/main.ts b/src/main.ts index 518215e..a395066 100644 --- a/src/main.ts +++ b/src/main.ts @@ -235,7 +235,7 @@ export default class CustomSortPlugin extends Plugin { // For the idea of monkey-patching credits go to https://github.com/nothingislost/obsidian-bartender patchFileExplorerFolder() { let plugin = this; - let leaf = this.app.workspace.getLeaf(); + let leaf = this.app.workspace.getLeaf(true); const fileExplorer = this.app.viewRegistry.viewByType["file-explorer"](leaf) as FileExplorerView; // @ts-ignore let tmpFolder = new TFolder(Vault, ""); diff --git a/versions.json b/versions.json index 4241a40..e28d65e 100644 --- a/versions.json +++ b/versions.json @@ -6,5 +6,7 @@ "0.6.2": "0.12.0", "0.7.0": "0.15.0", "0.7.1": "0.15.0", - "0.7.2": "0.15.0" + "0.7.2": "0.15.0", + "0.8.0": "0.15.0", + "0.8.1": "0.15.0" }