From f0450285ad3dffe00ce1b9a646c0d34192d3c87d Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Tue, 28 Feb 2023 23:31:00 +0100 Subject: [PATCH] fix(dtmm): Fix deleting mods preventing deployment --- crates/dtmm/src/state/delegate.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/dtmm/src/state/delegate.rs b/crates/dtmm/src/state/delegate.rs index 9a2a1ef..4f44a68 100644 --- a/crates/dtmm/src/state/delegate.rs +++ b/crates/dtmm/src/state/delegate.rs @@ -134,10 +134,8 @@ impl AppDelegate for Delegate { if self .sender .send(AsyncAction::DeleteMod((state.clone(), info))) - .is_ok() + .is_err() { - state.is_deployment_in_progress = true; - } else { tracing::error!("Failed to queue action to deploy mods"); } @@ -160,11 +158,12 @@ impl AppDelegate for Delegate { let info = cmd .get(ACTION_ADD_MOD) .expect("command type matched but didn't contain the expected value"); - if let Err(err) = self + if self .sender .send(AsyncAction::AddMod((state.clone(), info.clone()))) + .is_err() { - tracing::error!("Failed to add mod: {}", err); + tracing::error!("Failed to queue action to add mod"); } Handled::Yes }