fix(sonarr): Pass the series ID alongside all GetSeriesHistory events when publishing to the networking channel
This commit is contained in:
@@ -38,7 +38,9 @@ impl<'a> App<'a> {
|
||||
}
|
||||
ActiveSonarrBlock::SeriesHistory => {
|
||||
self
|
||||
.dispatch_network_event(SonarrEvent::GetSeriesHistory(None).into())
|
||||
.dispatch_network_event(
|
||||
SonarrEvent::GetSeriesHistory(self.extract_series_id().await).into(),
|
||||
)
|
||||
.await;
|
||||
}
|
||||
ActiveSonarrBlock::SeasonDetails => {
|
||||
|
||||
@@ -42,6 +42,10 @@ mod tests {
|
||||
#[tokio::test]
|
||||
async fn test_dispatch_by_series_history_block() {
|
||||
let (mut app, mut sync_network_rx) = construct_app_unit();
|
||||
app.data.sonarr_data.series.set_items(vec![Series {
|
||||
id: 1,
|
||||
..Series::default()
|
||||
}]);
|
||||
|
||||
app
|
||||
.dispatch_by_sonarr_block(&ActiveSonarrBlock::SeriesHistory)
|
||||
@@ -50,7 +54,7 @@ mod tests {
|
||||
assert!(app.is_loading);
|
||||
assert_eq!(
|
||||
sync_network_rx.recv().await.unwrap(),
|
||||
SonarrEvent::GetSeriesHistory(None).into()
|
||||
SonarrEvent::GetSeriesHistory(1).into()
|
||||
);
|
||||
assert!(!app.data.sonarr_data.prompt_confirm);
|
||||
assert_eq!(app.tick_count, 0);
|
||||
|
||||
Reference in New Issue
Block a user