Skip to content

Commit

Permalink
disable welcome page (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
Himanshu-Singh-Chauhan authored Jan 14, 2025
1 parent 8c70290 commit e1a206c
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const restoreWalkthroughsConfigurationKey = 'workbench.welcomePage.restor
export type RestoreWalkthroughsConfigurationValue = { folder: string; category?: string; step?: string };

const configurationKey = 'workbench.startupEditor';
const oldConfigurationKey = 'workbench.welcome.enabled';
// const oldConfigurationKey = 'workbench.welcome.enabled';
const telemetryOptOutStorageKey = 'workbench.telemetryOptOutShown';

export class StartupPageEditorResolverContribution implements IWorkbenchContribution {
Expand Down Expand Up @@ -97,7 +97,12 @@ export class StartupPageRunnerContribution implements IWorkbenchContribution {
// Wait for resolving startup editor until we are restored to reduce startup pressure
await this.lifecycleService.when(LifecyclePhase.Restored);

// Always open Welcome page for first-launch, no matter what is open or which startupEditor is set.
// Skip welcome page if startup editor is set to 'none'
if (this.configurationService.getValue(configurationKey) === 'none') {
return;
}

// Show telemetry opt-out notice on first launch unless startup editor is explicitly set to 'none'
if (
this.productService.enableTelemetry
&& this.productService.showTelemetryOptOut
Expand Down Expand Up @@ -220,11 +225,9 @@ function isStartupPageEnabled(configurationService: IConfigurationService, conte
}

const startupEditor = configurationService.inspect<string>(configurationKey);
if (!startupEditor.userValue && !startupEditor.workspaceValue) {
const welcomeEnabled = configurationService.inspect(oldConfigurationKey);
if (welcomeEnabled.value !== undefined && welcomeEnabled.value !== null) {
return welcomeEnabled.value;
}

if (startupEditor.value === 'none') {
return false;
}

return startupEditor.value === 'welcomePage'
Expand Down

0 comments on commit e1a206c

Please sign in to comment.