Skip to content

Commit

Permalink
Send without done for better animatability
Browse files Browse the repository at this point in the history
  • Loading branch information
leo848 committed Mar 28, 2024
1 parent 7377c8a commit 10c2129
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ fn handle_action(action: Action, latency: u64, client: &Responder) {
};
let improved_path = method(ctx.clone());

ctx.action.send(DistPathImprovement::from_path(improved_path.clone()));
ctx.action.send(DistPathImprovement::from_path(improved_path).done());
}
Action::CreatePath { matrix, method } => {
Expand Down Expand Up @@ -201,7 +202,8 @@ fn handle_action(action: Action, latency: u64, client: &Responder) {
};
let improved_path = method(ctx.clone());

ctx.action.send(PathImprovement::from_path(improved_path).done())
ctx.action.send(PathImprovement::from_path(improved_path.clone()));
ctx.action.send(PathImprovement::from_path(improved_path).done());
}
}
}
Expand Down

0 comments on commit 10c2129

Please sign in to comment.