Stop following when project is unshared (#4010)

Before this change the views would continue to update in the background
of the "disconnected" dialogue, which was disconcerting.

[[PR Description]]

Release Notes:

- Fixed an edge-case where following didn't handle unshare correctly
This commit is contained in:
Conrad Irwin 2024-01-11 11:26:56 -07:00 committed by GitHub
commit 43183538a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 170 additions and 46 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();
}