From 2338b32d96f5d5199e3d85727deaa333142fe325 Mon Sep 17 00:00:00 2001 From: Lost Paul <70213368+LostPaul@users.noreply.github.com> Date: Sat, 25 Jan 2025 11:36:37 +0100 Subject: [PATCH] Fix detach folder issue --- src/functions/styleFunctions.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/functions/styleFunctions.ts b/src/functions/styleFunctions.ts index 4ca8fca..4391c3e 100644 --- a/src/functions/styleFunctions.ts +++ b/src/functions/styleFunctions.ts @@ -1,6 +1,6 @@ import { TFile, TFolder } from 'obsidian'; import FolderNotesPlugin from '../main'; -import { getExcludedFolder } from 'src/ExcludeFolders/functions/folderFunctions'; +import { getDetachedFolder, getExcludedFolder } from 'src/ExcludeFolders/functions/folderFunctions'; import { getFolder, getFolderNote } from 'src/functions/folderNoteFunctions'; import { getFileExplorer } from './utils'; @@ -39,8 +39,9 @@ export async function applyCSSClassesToFolder(folderPath: string, plugin: Folder if (!folder || !(folder instanceof TFolder)) { return; } const folderNote = getFolderNote(plugin, folder.path); + const detachedFolderNote = getDetachedFolder(plugin, folder.path); - if (!folderNote) { + if (!folderNote || detachedFolderNote) { removeCSSClassFromEL(folder?.path, 'has-folder-note', plugin); removeCSSClassFromEL(folder?.path, 'only-has-folder-note', plugin); return;