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 = `${SetColorThemeAction.EnabledClass} disabled`; <del> private colorThemes: IWorkbenchColorTheme[] = []; </del> constructor( @IExtensionService extensionService: IExtensionService, @IWorkbenchThemeService private readonly workbenchThemeService: IWorkbenchThemeService, @IQuickInputService private readonly quickInputService: IQuickInputService, <ins> @IWorkbenchExtensionEnablementService private readonly extensionEnablementService: IWorkbenchExtensionEnablementService, </ins> ) { super(SetColorThemeAction.ID, SetColorThemeAction.TITLE.value, SetColorThemeAction.DisabledClass, false); this._register(Event.any<any>(extensionService.onDidChangeExtensions, workbenchThemeService.onDidColorThemeChange)(() => this.update(), this)); <del> workbenchThemeService.getColorThemes().then(colorThemes => { this.colorThemes = colorThemes; this.update(); }); </del> this.update(); } update(): void { <del> this.enabled = !!this.extension && (this.extension.state === ExtensionState.Installed) && this.colorThemes.some(th => isThemeFromExtension(th, this.extension)); this.class = this.enabled ? SetColorThemeAction.EnabledClass : SetColorThemeAction.DisabledClass; </del> <ins> this.workbenchThemeService.getColorThemes().then(colorThemes => { this.enabled = this.computeEnablement(colorThemes); this.class = this.enabled ? SetColorThemeAction.EnabledClass : SetColorThemeAction.DisabledClass; }); } private computeEnablement(colorThemes: IWorkbenchColorTheme[]): boolean { return !!this.extension && this.extension.state === ExtensionState.Installed && this.extensionEnablementService.isEnabledEnablementState(this.extension.enablementState) && colorThemes.some(th => isThemeFromExtension(th, this.extension)); </ins> } override async run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean; ignoreFocusLost: boolean } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise<any> { <del> this.colorThemes = await this.workbenchThemeService.getColorThemes(); </del> <ins> const colorThemes = await this.workbenchThemeService.getColorThemes(); </ins> <del> this.update(); if (!this.enabled) { </del> <ins> if (!this.computeEnablement(colorThemes)) { </ins> return; } const currentTheme = this.workbenchThemeService.getColorTheme(); const delayer = new Delayer<any>(100); <del> const picks = getQuickPickEntries(this.colorThemes, currentTheme, this.extension, showCurrentTheme); </del> <ins> const picks = getQuickPickEntries(colorThemes, currentTheme, this.extension, showCurrentTheme); </ins> const pickedTheme = await this.quickInputService.pick( picks, {