|
@ -43,14 +43,17 @@ export class FolderNode extends ViewNode { |
|
|
this.root.descendants, |
|
|
this.root.descendants, |
|
|
this.relativePath === undefined |
|
|
this.relativePath === undefined |
|
|
); |
|
|
); |
|
|
if (nesting !== ViewFilesLayout.List) { |
|
|
|
|
|
|
|
|
if (nesting === ViewFilesLayout.List) { |
|
|
|
|
|
this.root.descendants.forEach(n => (n.relativePath = this.root.relativePath)); |
|
|
|
|
|
children = this.root.descendants; |
|
|
|
|
|
} else { |
|
|
children = []; |
|
|
children = []; |
|
|
for (const folder of this.root.children.values()) { |
|
|
for (const folder of this.root.children.values()) { |
|
|
if (folder.value === undefined) { |
|
|
if (folder.value === undefined) { |
|
|
children.push( |
|
|
children.push( |
|
|
new FolderNode( |
|
|
new FolderNode( |
|
|
this.view, |
|
|
this.view, |
|
|
this, |
|
|
|
|
|
|
|
|
this.folderName ? this : this.parent!, |
|
|
this.repoPath, |
|
|
this.repoPath, |
|
|
folder.name, |
|
|
folder.name, |
|
|
folder, |
|
|
folder, |
|
@ -61,12 +64,11 @@ export class FolderNode extends ViewNode { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Make sure to set the parent
|
|
|
|
|
|
(folder.value as any).parent = this.folderName ? this : this.parent!; |
|
|
folder.value.relativePath = this.root.relativePath; |
|
|
folder.value.relativePath = this.root.relativePath; |
|
|
children.push(folder.value); |
|
|
children.push(folder.value); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
|
|
|
this.root.descendants.forEach(n => (n.relativePath = this.root.relativePath)); |
|
|
|
|
|
children = this.root.descendants; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
children.sort((a, b) => { |
|
|
children.sort((a, b) => { |
|
|