Change:
private static readonly EnabledClass = `${ExtensionAction.LABEL_ACTION_CLASS} theme`; private static readonly DisabledClass = `${SetFileIconThemeAction.EnabledClass} disabled`; <del> private fileIconThemes: IWorkbenchFileIconTheme[] = []; </del> constructor( @IExtensionService extensionService: IExtensionService, @IWorkbenchThemeService private readonly workbenchThemeService: IWorkbenchThemeService, <del> @IQuickInputService private readonly quickInputService: IQuickInputService </del> <ins> @IQuickInputService private readonly quickInputService: IQuickInputService, @IWorkbenchExtensionEnablementService private readonly extensionEnablementService: IWorkbenchExtensionEnablementService, </ins> ) { super(SetFileIconThemeAction.ID, SetFileIconThemeAction.TITLE.value, SetFileIconThemeAction.DisabledClass, false); this._register(Event.any<any>(extensionService.onDidChangeExtensions, workbenchThemeService.onDidFileIconThemeChange)(() => this.update(), this)); <del> workbenchThemeService.getFileIconThemes().then(fileIconThemes => { this.fileIconThemes = fileIconThemes; this.update(); }); </del> this.update(); } update(): void { <del> this.enabled = !!this.extension && (this.extension.state === ExtensionState.Installed) && this.fileIconThemes.some(th => isThemeFromExtension(th, this.extension)); this.class = this.enabled ? SetFileIconThemeAction.EnabledClass : SetFileIconThemeAction.DisabledClass; </del> <ins> this.workbenchThemeService.getFileIconThemes().then(fileIconThemes => { this.enabled = this.computeEnablement(fileIconThemes); this.class = this.enabled ? SetFileIconThemeAction.EnabledClass : SetFileIconThemeAction.DisabledClass; }); } private computeEnablement(colorThemfileIconThemess: IWorkbenchFileIconTheme[]): boolean { return !!this.extension && this.extension.state === ExtensionState.Installed && this.extensionEnablementService.isEnabledEnablementState(this.extension.enablementState) && colorThemfileIconThemess.some(th => isThemeFromExtension(th, this.extension)); </ins> } override async run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean; ignoreFocusLost: boolean } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise<any> { <del> this.fileIconThemes = await this.workbenchThemeService.getFileIconThemes(); this.update(); if (!this.enabled) { </del> <ins> const fileIconThemes = await this.workbenchThemeService.getFileIconThemes(); if (!this.computeEnablement(fileIconThemes)) { </ins> return; } const currentTheme = this.workbenchThemeService.getFileIconTheme(); const delayer = new Delayer<any>(100); <del> const picks = getQuickPickEntries(this.fileIconThemes, currentTheme, this.extension, showCurrentTheme); </del> <ins> const picks = getQuickPickEntries(fileIconThemes, currentTheme, this.extension, showCurrentTheme); </ins> const pickedTheme = await this.quickInputService.pick( picks, {

Discussion:
Issue Type: <bBug</bI opened theme extension and click enable / disable fast. I see "Set Theme" button when extension is disabled and no "Set Theme" when it is enabled. VS Code version: Code 1.68.1 (, 2022-06-14T12:48:37.209Z) OS version: Darwin arm64 21.5.0 Restricted Mode: No Remote OS version: Linux arm64 4.9.253-tegra <!-- generated by issue reporter --
<img width="582" alt="Screenshot 2022-06-28 at 11 08 49" src="https://user-"<img width="660" alt="Screenshot 2022-06-28 at 11 08 53" src="https://user-"
I can repro this. First assigning to for extension details page.
Cool, thanks