Keep room UI state when disconnecting

This commit is contained in:
Joscha 2022-07-21 17:32:49 +02:00
parent 38f8c0ed66
commit f1b7ef0b98

View file

@ -197,7 +197,10 @@ impl Rooms {
}
KeyCode::Char('d') => {
if let Some(name) = self.list.cursor() {
self.euph_rooms.remove(&name);
let room = self.euph_rooms.entry(name.clone()).or_insert_with(|| {
EuphRoom::new(self.vault.euph(name.clone()), self.ui_event_tx.clone())
});
room.disconnect();
}
}
KeyCode::Char('D') => {