gracefully handle error when showing notification

fixes #265
This commit is contained in:
Henrik Friedrichsen
2020-09-07 23:38:13 +02:00
parent 9be4ca8185
commit 69f11cdcf7

View File

@@ -221,10 +221,9 @@ impl Queue {
current.replace(index);
self.spotify.update_track();
if self.spotify.cfg.notify.unwrap_or(false) {
Notification::new()
.summary(&track.to_string())
.show()
.unwrap();
if let Err(e) = Notification::new().summary(&track.to_string()).show() {
error!("error showing notification: {:?}", e);
}
}
}