Avoid deserializing all themes to compute settings JSON schema

This commit is contained in:
Max Brunsfeld
2023-07-14 14:29:22 -07:00
parent 0f5489397f
commit c69d0d50cd
2 changed files with 19 additions and 7 deletions
+2 -2
View File
@@ -178,8 +178,8 @@ impl settings::Setting for ThemeSettings {
let mut root_schema = generator.root_schema_for::<ThemeSettingsContent>();
let theme_names = cx
.global::<Arc<ThemeRegistry>>()
.list(params.staff_mode)
.map(|theme| Value::String(theme.name.clone()))
.list_names(params.staff_mode)
.map(|theme_name| Value::String(theme_name.to_string()))
.collect();
let theme_name_schema = SchemaObject {