explorer - always expand single root folder

This commit is contained in:
Benjamin Pasero
2017-07-10 21:06:31 +02:00
parent 5d024c863a
commit 6f5fd39b65

View File

@@ -722,10 +722,12 @@ export class ExplorerView extends CollapsibleView {
const rootAndTargets = { root, resource: root.resource, options: { resolveTo: [] } };
targetsToResolve.push(rootAndTargets);
});
let targetsToExpand: URI[] = [];
let targetsToExpand: URI[] = [];
if (this.settings[ExplorerView.MEMENTO_EXPANDED_FOLDER_RESOURCES]) {
targetsToExpand = this.settings[ExplorerView.MEMENTO_EXPANDED_FOLDER_RESOURCES].map((e: string) => URI.parse(e));
} else if (this.model.roots.length === 1) {
targetsToExpand = this.model.roots.map(root => root.resource); // always expand single root folder
}
// First time refresh: Receive target through active editor input or selection and also include settings from previous session