refactor: config improvements

This commit is contained in:
Ashley Wulber 2024-01-18 19:01:11 -05:00 committed by Jeremy Soller
parent 3eed30f723
commit efe4ce2f5b
7 changed files with 69 additions and 86 deletions

View file

@ -85,15 +85,12 @@ pub fn subscription(is_dark: bool) -> Subscription<crate::theme::Theme> {
.into(),
crate::cosmic_theme::Theme::version(),
)
.map(|(_, res)| {
let theme = res.unwrap_or_else(|(errors, theme)| {
for err in errors {
tracing::error!("{:?}", err);
}
theme
});
.map(|res| {
for err in res.errors {
tracing::error!("{:?}", err);
}
Theme::system(Arc::new(theme))
Theme::system(Arc::new(res.config))
})
}