fix(multiuser): properly clear UI when a user detaches (#1317)

This commit is contained in:
Aram Drevekenin 2022-04-13 10:05:38 +02:00 committed by GitHub
parent 8e53fcbe1b
commit b185f2827f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -5,7 +5,7 @@ expression: last_snapshot
---
Zellij (e2e-test)  Tab #1 
┌ Pane #1 ─────────────────────────────────────────────────┐┌ Pane #2 ─────────────────────────────────────────────────┐
│$ ││$ I am some text█
│$ █ ││$ I am some text
│ ││ │
│ ││ │
│ ││ │

View File

@ -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();