mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
Log error when failing to load a theme in ThemeSelector
This commit is contained in:
parent
d9ab406961
commit
14f45ac1bc
@ -107,10 +107,13 @@ impl ThemeSelector {
|
||||
|
||||
fn confirm(&mut self, _: &(), cx: &mut ViewContext<Self>) {
|
||||
if let Some(mat) = self.matches.get(self.selected_index) {
|
||||
if let Ok(theme) = self.registry.get(&mat.string) {
|
||||
self.settings_tx.lock().borrow_mut().theme = theme;
|
||||
cx.notify_all();
|
||||
cx.emit(Event::Dismissed);
|
||||
match self.registry.get(&mat.string) {
|
||||
Ok(theme) => {
|
||||
self.settings_tx.lock().borrow_mut().theme = theme;
|
||||
cx.notify_all();
|
||||
cx.emit(Event::Dismissed);
|
||||
}
|
||||
Err(error) => log::error!("error loading theme {}: {}", mat.string, error),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user