Fix setting file count description to be for user selected files

Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
Sanjula Ganepola
2024-11-21 22:24:58 -05:00
parent c10f7109ac
commit 9079f014c9
3 changed files with 6 additions and 3 deletions

View File

@@ -12,8 +12,9 @@ export default class InputsTreeItem extends TreeItem implements GithubLocalActio
constructor(public workspaceFolder: WorkspaceFolder, inputs: Setting[], inputFiles: SettingFile[]) {
super('Inputs', TreeItemCollapsibleState.Collapsed);
const selectedInputFiles = inputFiles.filter(inputFile => inputFile.selected);
this.description = `${inputs.filter(input => input.selected).length}/${inputs.length}` +
(inputFiles.length > 0 ? ` + ${inputFiles.length} input file(s)` : ``);
(selectedInputFiles.length > 0 ? ` + ${selectedInputFiles.length} input file(s)` : ``);
this.contextValue = InputsTreeItem.contextValue;
this.iconPath = new ThemeIcon('record-keys');
}