refactor: Reduced the number of clones necessary when building modal structs

This commit is contained in:
2025-01-18 13:56:18 -07:00
parent 652bbcd5d4
commit fda69178b9
13 changed files with 203 additions and 276 deletions
+2 -3
View File
@@ -187,12 +187,11 @@ impl<'a> App<'a> {
async fn check_for_sonarr_prompt_action(&mut self) {
if self.data.sonarr_data.prompt_confirm {
self.data.sonarr_data.prompt_confirm = false;
if let Some(sonarr_event) = &self.data.sonarr_data.prompt_confirm_action {
if let Some(sonarr_event) = self.data.sonarr_data.prompt_confirm_action.take() {
self
.dispatch_network_event(sonarr_event.clone().into())
.dispatch_network_event(sonarr_event.into())
.await;
self.should_refresh = true;
self.data.sonarr_data.prompt_confirm_action = None;
}
}
}