fix(dtmm): Fix deleting mods preventing deployment

This commit is contained in:
Lucas Schwiderski 2023-02-28 23:31:00 +01:00
parent e2043aa502
commit f0450285ad
Signed by: lucas
GPG key ID: AA12679AAA6DF4D8

View file

@ -134,10 +134,8 @@ impl AppDelegate<State> for Delegate {
if self if self
.sender .sender
.send(AsyncAction::DeleteMod((state.clone(), info))) .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"); tracing::error!("Failed to queue action to deploy mods");
} }
@ -160,11 +158,12 @@ impl AppDelegate<State> for Delegate {
let info = cmd let info = cmd
.get(ACTION_ADD_MOD) .get(ACTION_ADD_MOD)
.expect("command type matched but didn't contain the expected value"); .expect("command type matched but didn't contain the expected value");
if let Err(err) = self if self
.sender .sender
.send(AsyncAction::AddMod((state.clone(), info.clone()))) .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 Handled::Yes
} }