Add setting to enable welcome dialog (#177395)

This commit is contained in:
Bhavya U 2023-03-16 14:12:13 -07:00 committed by GitHub
parent cd554ba969
commit 5418d03bfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,9 @@ import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } fr
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService';
import { IWelcomeDialogService as IWelcomeDialogService } from 'vs/workbench/contrib/welcomeDialog/browser/welcomeDialogService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
const configurationKey = 'welcome.experimental.dialog';
class WelcomeDialogContribution {
@ -17,8 +20,14 @@ class WelcomeDialogContribution {
constructor(
@IWelcomeDialogService welcomeDialogService: IWelcomeDialogService,
@IStorageService storageService: IStorageService,
@IBrowserWorkbenchEnvironmentService environmentService: IBrowserWorkbenchEnvironmentService
@IBrowserWorkbenchEnvironmentService environmentService: IBrowserWorkbenchEnvironmentService,
@IConfigurationService configurationService: IConfigurationService
) {
const setting = configurationService.inspect<boolean>(configurationKey);
if (!setting.value) {
return;
}
const welcomeDialog = environmentService.options?.welcomeDialog;
if (!welcomeDialog) {
return;