Folder overview on root level fix

This commit is contained in:
Lost Paul 2023-07-06 13:52:07 +02:00
parent 5e582e66b6
commit 4cddc2a04f
2 changed files with 4 additions and 1 deletions

View file

@ -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; }

View file

@ -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;