From b1a43dff3a33e34e4eb33f9a1ec0ce951cbbfc13 Mon Sep 17 00:00:00 2001 From: SebastianMC <23032356+SebastianMC@users.noreply.github.com> Date: Wed, 17 Aug 2022 20:23:37 +0200 Subject: [PATCH] More informative message to the user when no custom sorting specification was found at all --- manifest.json | 2 +- package.json | 2 +- src/main.ts | 4 ++-- versions.json | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index 8083d65..fe0b526 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "custom-sort", "name": "Custom File Explorer sorting", - "version": "0.5.188", + "version": "0.5.189", "minAppVersion": "0.12.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 3da91fc..0823f72 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-custom-sort", - "version": "0.5.188", + "version": "0.5.189", "description": "Custom Sort plugin for Obsidian (https://obsidian.md)", "main": "main.js", "scripts": { diff --git a/src/main.ts b/src/main.ts index 7bf6dd1..54ac35b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -87,9 +87,9 @@ export default class CustomSortPlugin extends Plugin { new Notice(`Parsing custom sorting specification SUCCEEDED!`) } else { if (anySortingSpecFound) { - errorMessage = errorMessage ? errorMessage : `No custom sorting specification found or only empty specification(s)` - } else { errorMessage = `No valid '${SORTINGSPEC_YAML_KEY}:' key(s) in YAML front matter or multiline YAML indentation error or general YAML syntax error` + } else { + errorMessage = errorMessage ? errorMessage : `No custom sorting specification found or only empty specification(s)` } new Notice(`Parsing custom sorting specification FAILED. Suspending the plugin.\n${errorMessage}`, ERROR_NOTICE_TIMEOUT) this.settings.suspended = true diff --git a/versions.json b/versions.json index 7c376f3..f2f0b28 100644 --- a/versions.json +++ b/versions.json @@ -1,3 +1,4 @@ { - "0.5.188": "0.12.0" + "0.5.188": "0.12.0", + "0.5.189": "0.12.0" }