Stop following when project is unshared

Before this change the views would continue to update in the background
of the "disconnected" dialogue, which was disconcerting.
This commit is contained in:
Conrad Irwin 2024-01-10 23:02:36 -07:00
parent 44969460cd
commit f418bd907d
7 changed files with 174 additions and 53 deletions

View file

@ -512,6 +512,11 @@ impl Workspace {
project::Event::DisconnectedFromHost => {
this.update_window_edited(cx);
let panes_to_unfollow: Vec<View<Pane>> =
this.follower_states.keys().map(|k| k.clone()).collect();
for pane in panes_to_unfollow {
this.unfollow(&pane, cx);
}
cx.disable_focus();
}