Code change:
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

Related discussion:
text: private static readonly EnabledClass = `${ExtensionAction.LABEL_ACTION_CLASS} theme`; private static readonly DisabledClass = `${SetProductIconThemeAction.EnabledClass} disabled`; <del> private productIconThemes: IWorkbenchProductIconTheme[] = []; </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(SetProductIconThemeAction.ID, SetProductIconThemeAction.TITLE.value, SetProductIconThemeAction.DisabledClass, false); this._register(Event.any<any>(extensionService.onDidChangeExtensions, workbenchThemeService.onDidProductIconThemeChange)(() => this.update(), this)); <del> workbenchThemeService.getProductIconThemes().then(productIconThemes => { this.productIconThemes = productIconThemes; this.update(); }); </del> this.update(); } update(): void { <del> this.enabled = !!this.extension && (this.extension.state === ExtensionState.Installed) && this.productIconThemes.some(th => isThemeFromExtension(th, this.extension)); this.class = this.enabled ? SetProductIconThemeAction.EnabledClass : SetProductIconThemeAction.DisabledClass; </del> <ins> this.workbenchThemeService.getProductIconThemes().then(productIconThemes => { this.enabled = this.computeEnablement(productIconThemes); this.class = this.enabled ? SetProductIconThemeAction.EnabledClass : SetProductIconThemeAction.DisabledClass; }); } private computeEnablement(productIconThemes: IWorkbenchProductIconTheme[]): boolean { return !!this.extension && this.extension.state === ExtensionState.Installed && this.extensionEnablementService.isEnabledEnablementState(this.extension.enablementState) && productIconThemes.some(th => isThemeFromExtension(th, this.extension)); </ins> } override async run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean; ignoreFocusLost: boolean } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise<any> { <del> this.productIconThemes = await this.workbenchThemeService.getProductIconThemes(); this.update(); if (!this.enabled) { </del> <ins> const productIconThemes = await this.workbenchThemeService.getProductIconThemes(); if (!this.computeEnablement(productIconThemes)) { </ins> return; } const currentTheme = this.workbenchThemeService.getProductIconTheme(); const delayer = new Delayer<any>(100); <del> const picks = getQuickPickEntries(this.productIconThemes, currentTheme, this.extension, showCurrentTheme); </del> <ins> const picks = getQuickPickEntries(productIconThemes, currentTheme, this.extension, showCurrentTheme); </ins> const pickedTheme = await this.quickInputService.pick( picks, {