Reland "Remove cx from ThemeSettings" (#39720)

- **Reapply "Remove cx from ThemeSettings (#38836)" (#39691)**
- **Fix theme loading races**

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin
2025-10-08 17:36:52 +02:00
committed by GitHub
parent 70af11ef2a
commit 1d1c799b4b
60 changed files with 395 additions and 462 deletions
@@ -5,7 +5,7 @@ use anyhow::Result;
use extension::{ExtensionHostProxy, ExtensionThemeProxy};
use fs::Fs;
use gpui::{App, BackgroundExecutor, SharedString, Task};
use theme::{ThemeRegistry, ThemeSettings};
use theme::{GlobalTheme, ThemeRegistry};
pub fn init(
extension_host_proxy: Arc<ExtensionHostProxy>,
@@ -46,7 +46,7 @@ impl ExtensionThemeProxy for ThemeRegistryProxy {
}
fn reload_current_theme(&self, cx: &mut App) {
ThemeSettings::reload_current_theme(cx)
GlobalTheme::reload_theme(cx)
}
fn list_icon_theme_names(
@@ -83,6 +83,6 @@ impl ExtensionThemeProxy for ThemeRegistryProxy {
}
fn reload_current_icon_theme(&self, cx: &mut App) {
ThemeSettings::reload_current_icon_theme(cx)
GlobalTheme::reload_icon_theme(cx)
}
}