Fix bug "disable folder collapsing" is disabled

This commit is contained in:
Lost Paul 2025-06-05 11:39:37 +02:00
parent 8533e30ce5
commit 4871580e10
3 changed files with 3 additions and 4 deletions

View file

@ -367,6 +367,7 @@ export class Commands {
});
// return;
}
if (detachedExcludedFolder) { return; }
subMenu.addItem((item) => {
item.setTitle('Exclude folder from folder notes')
.setIcon('x-circle')

View file

@ -82,9 +82,7 @@ function initializeAllFolderTitles(container: Element, plugin: FolderNotesPlugin
if (!folderEl) continue;
const folderPath = folderEl.getAttribute('data-path') || '';
setTimeout(() => {
setupFolderTitle(folderTitle, plugin, folderPath);
}, 1000);
setupFolderTitle(folderTitle, plugin, folderPath);
}
}

View file

@ -48,8 +48,8 @@ export async function handleViewHeaderClick(event: MouseEvent, plugin: FolderNot
}
export async function handleFolderClick(event: MouseEvent, plugin: FolderNotesPlugin) {
if (!(event.target instanceof HTMLElement)) return;
event.target.setAttribute('data-initialized', 'false');
if (!event || !event.target) return;
if (!event.shiftKey) {