Skip to content

Commit ecad95c

Browse files
authored
Fix toggleData button (microsoft#197279) (microsoft#197284)
Fixes microsoft#197282
1 parent b6d8d21 commit ecad95c

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ import { ConfigurationScope, Extensions, IConfigurationRegistry } from 'vs/platf
6363
import { Registry } from 'vs/platform/registry/common/platform';
6464
import { defaultButtonStyles } from 'vs/platform/theme/browser/defaultStyles';
6565
import { IProductService } from 'vs/platform/product/common/productService';
66-
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
6766
import { registerNavigableContainer } from 'vs/workbench/browser/actions/widgetNavigationCommands';
6867
import { IEditorProgressService } from 'vs/platform/progress/common/progress';
6968

@@ -237,7 +236,6 @@ export class SettingsEditor2 extends EditorPane {
237236
@ILanguageService private readonly languageService: ILanguageService,
238237
@IExtensionManagementService extensionManagementService: IExtensionManagementService,
239238
@IProductService private readonly productService: IProductService,
240-
@IEnvironmentService private readonly environmentService: IEnvironmentService,
241239
@IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService,
242240
@IEditorProgressService private readonly editorProgressService: IEditorProgressService,
243241
) {
@@ -1289,7 +1287,7 @@ export class SettingsEditor2 extends EditorPane {
12891287
}
12901288

12911289
const additionalGroups: ISettingsGroup[] = [];
1292-
const toggleData = await getExperimentalExtensionToggleData(this.extensionGalleryService, this.environmentService, this.productService);
1290+
const toggleData = await getExperimentalExtensionToggleData(this.extensionGalleryService, this.productService);
12931291
if (toggleData && groups.filter(g => g.extensionInfo).length) {
12941292
for (const key in toggleData.settingsEditorRecommendedExtensions) {
12951293
const extension = toggleData.recommendedExtensionsGalleryInfo[key];

src/vs/workbench/contrib/preferences/common/preferences.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { CancellationToken } from 'vs/base/common/cancellation';
77
import { IStringDictionary } from 'vs/base/common/collections';
88
import { IExtensionRecommendations } from 'vs/base/common/product';
99
import { RawContextKey } from 'vs/platform/contextkey/common/contextkey';
10-
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
1110
import { IExtensionGalleryService, IGalleryExtension } from 'vs/platform/extensionManagement/common/extensionManagement';
1211
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
1312
import { IProductService } from 'vs/platform/product/common/productService';
@@ -107,7 +106,7 @@ export type ExtensionToggleData = {
107106

108107
let cachedExtensionToggleData: ExtensionToggleData | undefined;
109108

110-
export async function getExperimentalExtensionToggleData(extensionGalleryService: IExtensionGalleryService, environmentService: IEnvironmentService, productService: IProductService): Promise<ExtensionToggleData | undefined> {
109+
export async function getExperimentalExtensionToggleData(extensionGalleryService: IExtensionGalleryService, productService: IProductService): Promise<ExtensionToggleData | undefined> {
111110
if (!ENABLE_EXTENSION_TOGGLE_SETTINGS) {
112111
return undefined;
113112
}
@@ -120,7 +119,7 @@ export async function getExperimentalExtensionToggleData(extensionGalleryService
120119
return cachedExtensionToggleData;
121120
}
122121

123-
if (!environmentService.isBuilt && productService.extensionRecommendations && productService.commonlyUsedSettings) {
122+
if (productService.extensionRecommendations && productService.commonlyUsedSettings) {
124123
const settingsEditorRecommendedExtensions: IStringDictionary<IExtensionRecommendations> = {};
125124
Object.keys(productService.extensionRecommendations).forEach(extensionId => {
126125
const extensionInfo = productService.extensionRecommendations![extensionId];

0 commit comments

Comments
 (0)