mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-05 02:20:10 +00:00
Log error when failing to load a theme in ThemeSelector
This commit is contained in:
parent
d9ab406961
commit
14f45ac1bc
1 changed files with 7 additions and 4 deletions
|
@ -107,11 +107,14 @@ impl ThemeSelector {
|
||||||
|
|
||||||
fn confirm(&mut self, _: &(), cx: &mut ViewContext<Self>) {
|
fn confirm(&mut self, _: &(), cx: &mut ViewContext<Self>) {
|
||||||
if let Some(mat) = self.matches.get(self.selected_index) {
|
if let Some(mat) = self.matches.get(self.selected_index) {
|
||||||
if let Ok(theme) = self.registry.get(&mat.string) {
|
match self.registry.get(&mat.string) {
|
||||||
|
Ok(theme) => {
|
||||||
self.settings_tx.lock().borrow_mut().theme = theme;
|
self.settings_tx.lock().borrow_mut().theme = theme;
|
||||||
cx.notify_all();
|
cx.notify_all();
|
||||||
cx.emit(Event::Dismissed);
|
cx.emit(Event::Dismissed);
|
||||||
}
|
}
|
||||||
|
Err(error) => log::error!("error loading theme {}: {}", mat.string, error),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue