Fix bugs causing walkthoughs to not open on install

This commit is contained in:
Jackson Kearl
2021-06-02 18:00:14 -07:00
parent ab1c920200
commit 2974dcbd98
@@ -212,7 +212,7 @@ export class GettingStartedService extends Disposable implements IGettingStarted
this._register(this.extensionManagementService.onDidInstallExtension(async e => {
if (await this.hostService.hadLastFocus()) {
this.sessionInstalledExtensions.add(e.identifier.id);
this.sessionInstalledExtensions.add(e.identifier.id.toLowerCase());
}
this.progressByEvent(`extensionInstalled:${e.identifier.id.toLowerCase()}`);
}));
@@ -397,7 +397,7 @@ export class GettingStartedService extends Disposable implements IGettingStarted
let sectionToOpen: string | undefined;
let sectionToOpenIndex = Math.max();
let sectionToOpenIndex = Math.min(); // '+Infinity';
await Promise.all(extension.contributes?.walkthroughs?.map(async (walkthrough, index) => {
const categoryID = extension.identifier.value + '#' + walkthrough.id;
@@ -407,10 +407,10 @@ export class GettingStartedService extends Disposable implements IGettingStarted
]);
if (
this.sessionInstalledExtensions.has(extension.identifier.value)
this.sessionInstalledExtensions.has(extension.identifier.value.toLowerCase())
&& this.contextService.contextMatchesRules(ContextKeyExpr.deserialize(override ?? walkthrough.when) ?? ContextKeyExpr.true())
) {
this.sessionInstalledExtensions.delete(extension.identifier.value);
this.sessionInstalledExtensions.delete(extension.identifier.value.toLowerCase());
if (index < sectionToOpenIndex) {
sectionToOpen = categoryID;
sectionToOpenIndex = index;