Fixed instant not being updated on empty responses
Merging due to upstream clippy fixes
@@ -346,7 +346,8 @@ impl<'a> Network<'a> {
)
.await;
- if let Ok(Some(c)) = context {
+ match context {
+ Ok(Some(c)) => {
let mut app = self.app.lock().await;
app.current_playback_context = Some(c.clone());
app.instant_since_last_current_playback_poll = Instant::now();
@@ -362,6 +363,14 @@ impl<'a> Network<'a> {
}
};
}
+ Ok(None) => {
+ let mut app = self.app.lock().await;
+ app.instant_since_last_current_playback_poll = Instant::now();
+ }
+ Err(e) => {
+ self.handle_error(anyhow!(e)).await;
+ }
+ }
let mut app = self.app.lock().await;
app.seek_ms.take();
