fix: use loaded theme from config, instead of falling back to default theme when there is an error

This commit is contained in:
Ashley Wulber 2025-07-11 12:13:27 -04:00 committed by Ashley Wulber
parent d6355613c9
commit 57a26e2da8

View file

@ -45,7 +45,15 @@ impl From<(Option<Config>, Option<Config>, Option<Vec<Srgba>>)> for ThemeCustomi
Option<Vec<Srgba>>,
),
) -> Self {
let theme = Theme::get_entry(theme_config.as_ref().unwrap()).unwrap_or_default();
let theme = match Theme::get_entry(theme_config.as_ref().unwrap()) {
Ok(theme) => theme,
Err((errs, theme)) => {
for err in errs {
tracing::warn!("Error while loading theme: {err:?}");
}
theme
}
};
let mut theme_builder = match ThemeBuilder::get_entry(builder_config.as_ref().unwrap()) {
Ok(t) => t,