Skip to content

Commit fcf16ea

Browse files
Fixed a bug causing the set active option button to not appear
1 parent 8efa688 commit fcf16ea

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

src/archiveTree.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,22 @@ export class ArchiveTreeProvider implements vscode.TreeDataProvider<ArchiveTreeI
313313
this.onDidChangeRootsEmitter.fire();
314314
}
315315

316-
refresh(): void {
316+
async refresh(): Promise<void> {
317+
for (const root of this.roots) {
318+
const fileRootPath = root.fsPath;
319+
const validMods = await findValidModFolders(root);
320+
if (validMods.length > 1) {
321+
this.hasMultipleMods.add(fileRootPath);
322+
} else {
323+
this.hasMultipleMods.delete(fileRootPath);
324+
if (validMods.length === 1) {
325+
this.logicalRoots.set(fileRootPath, validMods[0]!.fsPath);
326+
} else {
327+
this.logicalRoots.delete(fileRootPath);
328+
}
329+
}
330+
}
331+
await this.persistLogicalRoots();
317332
this.onDidChangeTreeDataEmitter.fire(undefined);
318333
}
319334

0 commit comments

Comments
 (0)