fix: clarify comments (#1519)
This commit is contained in:
parent
35498b6030
commit
464f21aebd
1 changed files with 2 additions and 5 deletions
|
|
@ -216,7 +216,6 @@ impl InputHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn handle_actions(&mut self, actions: Vec<Action>, session_name: &str, clients: Vec<ClientId>) {
|
fn handle_actions(&mut self, actions: Vec<Action>, session_name: &str, clients: Vec<ClientId>) {
|
||||||
// TODO: handle Detach correctly
|
|
||||||
for action in actions {
|
for action in actions {
|
||||||
match action {
|
match action {
|
||||||
Action::Quit => {
|
Action::Quit => {
|
||||||
|
|
@ -224,13 +223,10 @@ impl InputHandler {
|
||||||
break;
|
break;
|
||||||
},
|
},
|
||||||
Action::Detach => {
|
Action::Detach => {
|
||||||
// self.should_exit = true;
|
|
||||||
// clients.split_last().into_iter().for_each(|(client_id, _)| {
|
|
||||||
let first = clients.first().unwrap();
|
let first = clients.first().unwrap();
|
||||||
let last = clients.last().unwrap();
|
let last = clients.last().unwrap();
|
||||||
self.os_input
|
self.os_input
|
||||||
.send_to_server(ClientToServerMsg::DetachSession(vec![*first, *last]));
|
.send_to_server(ClientToServerMsg::DetachSession(vec![*first, *last]));
|
||||||
// });
|
|
||||||
break;
|
break;
|
||||||
},
|
},
|
||||||
// Actions, that are indepenedent from the specific client
|
// Actions, that are indepenedent from the specific client
|
||||||
|
|
@ -245,7 +241,8 @@ impl InputHandler {
|
||||||
self.dispatch_action(action, Some(*client_id));
|
self.dispatch_action(action, Some(*client_id));
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
// TODO only dispatch for each client, for actions that need it
|
// FIXME: If a specific `session_id` is specified,
|
||||||
|
// then only send the actions to that specific `client_id`
|
||||||
for client_id in &clients {
|
for client_id in &clients {
|
||||||
self.dispatch_action(action.clone(), Some(*client_id));
|
self.dispatch_action(action.clone(), Some(*client_id));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue