diff --git a/src/folderOverview.ts b/src/folderOverview.ts index 07c0904..17146e4 100644 --- a/src/folderOverview.ts +++ b/src/folderOverview.ts @@ -127,6 +127,9 @@ export function createOverview(plugin: FolderNotesPlugin, source: string, el: HT function goThroughFolders(plugin: FolderNotesPlugin, list: HTMLLIElement | HTMLUListElement, folder: TFolder, depth: number, sourceFolderPath: string, ctx: MarkdownPostProcessorContext, yaml: yamlSettings, pathBlacklist: string[], includeTypes: string[], disableCanvasTag: boolean) { + if (sourceFolderPath === '') { + depth--; + } let files = folder.children.filter((file) => { const folderPath = plugin.getFolderPathFromString(file.path); if (!folderPath.startsWith(sourceFolderPath)) { return false; } diff --git a/src/modals/folderOverview.ts b/src/modals/folderOverview.ts index b19e133..c9da569 100644 --- a/src/modals/folderOverview.ts +++ b/src/modals/folderOverview.ts @@ -116,7 +116,7 @@ export class FolderOverviewSettings extends Modal { .setDesc('File & folder = +1 depth') .addSlider((slider) => slider - .setValue(this.yaml?.depth || 1) + .setValue(this.yaml?.depth || 2) .setLimits(1, 10, 1) .onChange(async (value) => { this.yaml.depth = value;