From 2974dcbd9856056987149ec1fec5f5e11e62ac34 Mon Sep 17 00:00:00 2001 From: Jackson Kearl Date: Wed, 2 Jun 2021 18:00:14 -0700 Subject: [PATCH] Fix bugs causing walkthoughs to not open on install --- .../gettingStarted/browser/gettingStartedService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedService.ts b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedService.ts index 308b2ac5cd5..e1064c17e56 100644 --- a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedService.ts +++ b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedService.ts @@ -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;