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

@ -1225,7 +1225,12 @@ impl Room {
};
self.client.send(proto::UnshareProject { project_id })?;
project.update(cx, |this, cx| this.unshare(cx))
project.update(cx, |this, cx| this.unshare(cx))?;
if self.local_participant.active_project == Some(project.downgrade()) {
self.set_location(Some(&project), cx).detach_and_log_err(cx);
}
Ok(())
}
pub(crate) fn set_location(