fix(multiuser): properly clear UI when a user detaches
@@ -477,6 +477,22 @@ pub fn start_server(mut os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) {
.send_to_screen(ScreenInstruction::TerminalResize(min_size))
.unwrap();
}
+ session_data
+ .write()
+ .unwrap()
+ .as_ref()
+ .unwrap()
+ .senders
+ .send_to_screen(ScreenInstruction::RemoveClient(client_id))
+ .unwrap();
+ session_data
+ .write()
+ .unwrap()
+ .as_ref()
+ .unwrap()
+ .senders
+ .send_to_plugin(PluginInstruction::RemoveClient(client_id))
+ .unwrap();
}
ServerInstruction::Render(serialized_output) => {
let client_ids = session_state.read().unwrap().client_ids();
