gpui: Add Global marker trait (#7095)
This should prevent a class of bugs where one queries the wrong type of global, which results in oddities at runtime. Release Notes: - N/A --------- Co-authored-by: Marshall <marshall@zed.dev> Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
co-authored by
Marshall
Marshall Bowers
parent
7bfa584eb6
commit
e6ebe7974d
@@ -60,7 +60,7 @@ pub fn init(themes_to_load: LoadThemes, cx: &mut AppContext) {
|
||||
LoadThemes::JustBase => (Box::new(()) as Box<dyn AssetSource>, false),
|
||||
LoadThemes::All(assets) => (assets, true),
|
||||
};
|
||||
registry::init(assets, cx);
|
||||
ThemeRegistry::set_global(assets, cx);
|
||||
|
||||
if load_user_themes {
|
||||
ThemeRegistry::global(cx).load_bundled_themes();
|
||||
|
||||
Reference in New Issue
Block a user