From 9fa737a41d6193105507776f4ab4a76d699c6dea Mon Sep 17 00:00:00 2001 From: Lost Paul <70213368+LostPaul@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:33:37 +0200 Subject: [PATCH] Fix #148 & #156 --- manifest.json | 2 +- src/main.ts | 5 ++++- styles.css | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 8c5b89e..8dbeb6e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "folder-notes", "name": "Folder notes", - "version": "1.7.31", + "version": "1.7.32", "minAppVersion": "0.15.0", "description": "Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.", "author": "Lost Paul", diff --git a/src/main.ts b/src/main.ts index 8ae231c..7995309 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,4 @@ -import { Plugin, TFile, TFolder, TAbstractFile, MarkdownPostProcessorContext, parseYaml, Notice, Keymap } from 'obsidian'; +import { Plugin, TFile, TFolder, TAbstractFile, MarkdownPostProcessorContext, parseYaml, Notice, Keymap, requireApiVersion } from 'obsidian'; import { DEFAULT_SETTINGS, FolderNotesSettings, SettingsTab } from './settings/SettingsTab'; import { Commands } from './Commands'; import { FileExplorerWorkspaceLeaf } from './globals'; @@ -44,6 +44,9 @@ export default class FolderNotesPlugin extends Plugin { if (this.settings.underlineFolderInPath) { document.body.classList.add('folder-note-underline-path'); } if (this.settings.stopWhitespaceCollapsing) { document.body.classList.add('fn-whitespace-stop-collapsing'); } if (this.settings.hideCollapsingIcon) { document.body.classList.add('fn-hide-collapse-icon'); } + if (requireApiVersion('1.7.2')) { + document.body.classList.add('version-1-7-2'); + } new Commands(this.app, this).registerCommands(); diff --git a/styles.css b/styles.css index 5a65414..d0d1d61 100644 --- a/styles.css +++ b/styles.css @@ -5,7 +5,7 @@ padding-top: 4px !important; } -.fn-whitespace-stop-collapsing .collapse-icon { +.version-1-7-2.fn-whitespace-stop-collapsing .nav-files-container .collapse-icon { padding-top: 4px !important; }