From 074966427d1983d655626e5e8df5d719b652f5ae Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Tue, 16 Jan 2024 11:23:34 +0200 Subject: [PATCH] Fix previous theme not being applied on startup --- crates/theme/src/theme.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index 3b158ab9bb7f558f21ae72a64437b2b9f0909f9d..92a5877f514ead1143b89b4d6d217accc153d767 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -62,6 +62,10 @@ pub enum LoadThemes { pub fn init(themes_to_load: LoadThemes, cx: &mut AppContext) { cx.set_global(ThemeRegistry::default()); + match themes_to_load { + LoadThemes::JustBase => (), + LoadThemes::All => cx.global_mut::().load_user_themes(), + } ThemeSettings::register(cx); let mut prev_buffer_font_size = ThemeSettings::get_global(cx).buffer_font_size; @@ -73,11 +77,6 @@ pub fn init(themes_to_load: LoadThemes, cx: &mut AppContext) { } }) .detach(); - - match themes_to_load { - LoadThemes::JustBase => (), - LoadThemes::All => cx.global_mut::().load_user_themes(), - } } pub trait ActiveTheme {