fix(appearance): reload system theme after successful import
This commit is contained in:
parent
60f2896e41
commit
1f31c78eb0
1 changed files with 13 additions and 6 deletions
|
|
@ -362,12 +362,15 @@ impl Page {
|
|||
.open_file()
|
||||
.await;
|
||||
|
||||
if let Ok(f) = res {
|
||||
Message::ImportFile(OpenResponse(Arc::new(f)))
|
||||
} else {
|
||||
// TODO Error toast?
|
||||
tracing::error!("failed to select a file for importing a custom theme.");
|
||||
Message::ImportError
|
||||
match res {
|
||||
Ok(f) => Message::ImportFile(OpenResponse(Arc::new(f))),
|
||||
Err(why) => {
|
||||
tracing::error!(
|
||||
?why,
|
||||
"failed to select a file for importing a custom theme."
|
||||
);
|
||||
Message::ImportError
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
@ -481,6 +484,10 @@ impl Page {
|
|||
.apply_theme();
|
||||
|
||||
self.drawer.reset(&self.theme_manager);
|
||||
|
||||
return cosmic::task::future(async move {
|
||||
app::Message::SetTheme(cosmic::theme::system_preference())
|
||||
});
|
||||
}
|
||||
|
||||
Message::UseDefaultWindowHint(v) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue