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()
|
.open_file()
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
if let Ok(f) = res {
|
match res {
|
||||||
Message::ImportFile(OpenResponse(Arc::new(f)))
|
Ok(f) => Message::ImportFile(OpenResponse(Arc::new(f))),
|
||||||
} else {
|
Err(why) => {
|
||||||
// TODO Error toast?
|
tracing::error!(
|
||||||
tracing::error!("failed to select a file for importing a custom theme.");
|
?why,
|
||||||
Message::ImportError
|
"failed to select a file for importing a custom theme."
|
||||||
|
);
|
||||||
|
Message::ImportError
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
@ -481,6 +484,10 @@ impl Page {
|
||||||
.apply_theme();
|
.apply_theme();
|
||||||
|
|
||||||
self.drawer.reset(&self.theme_manager);
|
self.drawer.reset(&self.theme_manager);
|
||||||
|
|
||||||
|
return cosmic::task::future(async move {
|
||||||
|
app::Message::SetTheme(cosmic::theme::system_preference())
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Message::UseDefaultWindowHint(v) => {
|
Message::UseDefaultWindowHint(v) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue