mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Disabling vscode-icons extension does not reset icons to default. Fixes #62298
This commit is contained in:
parent
59fe2d19fd
commit
fa0f2d2500
|
@ -44,6 +44,7 @@ const defaultThemeExtensionId = 'vscode-theme-defaults';
|
|||
const oldDefaultThemeExtensionId = 'vscode-theme-colorful-defaults';
|
||||
|
||||
const DEFAULT_ICON_THEME_SETTING_VALUE = 'vs-seti';
|
||||
const DEFAULT_ICON_THEME_ID = 'vscode.vscode-theme-seti-vs-seti';
|
||||
const fileIconsEnabledClass = 'file-icons-enabled';
|
||||
|
||||
const colorThemeRulesClassName = 'contributedColorTheme';
|
||||
|
@ -190,10 +191,10 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
|
|||
if (!theme) {
|
||||
// current theme is no longer available
|
||||
prevFileIconId = this.currentIconTheme.id;
|
||||
this.setFileIconTheme(DEFAULT_ICON_THEME_SETTING_VALUE, 'auto');
|
||||
this.setFileIconTheme(DEFAULT_ICON_THEME_ID, 'auto');
|
||||
} else {
|
||||
// restore color
|
||||
if (this.currentIconTheme.id === DEFAULT_ICON_THEME_SETTING_VALUE && !types.isUndefined(prevFileIconId) && await this.iconThemeStore.findThemeData(prevFileIconId)) {
|
||||
if (this.currentIconTheme.id === DEFAULT_ICON_THEME_ID && !types.isUndefined(prevFileIconId) && await this.iconThemeStore.findThemeData(prevFileIconId)) {
|
||||
this.setFileIconTheme(prevFileIconId, 'auto');
|
||||
prevFileIconId = undefined;
|
||||
}
|
||||
|
@ -269,7 +270,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
|
|||
if (devThemes.length) {
|
||||
return this.setFileIconTheme(devThemes[0].id, ConfigurationTarget.MEMORY);
|
||||
} else {
|
||||
return this.setFileIconTheme(theme && theme.id || DEFAULT_ICON_THEME_SETTING_VALUE, undefined);
|
||||
return this.setFileIconTheme(theme && theme.id || DEFAULT_ICON_THEME_ID, undefined);
|
||||
}
|
||||
});
|
||||
}),
|
||||
|
@ -292,7 +293,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
|
|||
let iconThemeSetting = this.configurationService.getValue<string | null>(ICON_THEME_SETTING);
|
||||
if (iconThemeSetting !== this.currentIconTheme.settingsId) {
|
||||
this.iconThemeStore.findThemeBySettingsId(iconThemeSetting).then(theme => {
|
||||
this.setFileIconTheme(theme && theme.id || DEFAULT_ICON_THEME_SETTING_VALUE, undefined);
|
||||
this.setFileIconTheme(theme && theme.id || DEFAULT_ICON_THEME_ID, undefined);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue