Clear out project registration and sharing state on disconnect

Previously, we weren't fully clearing the state associated with projects and worktrees when losing connection. This caused us to not see guest avatars disappear and not be able to re-share upon reconnect.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Nathan Sobo
2022-03-25 10:15:08 -06:00
co-authored by Antonio Scandurra
parent 3339739dbf
commit a3e9a3afbf
5 changed files with 97 additions and 84 deletions
+1 -1
View File
@@ -1278,7 +1278,7 @@ impl Workspace {
self.project.update(cx, |project, cx| {
if project.is_local() {
if project.is_shared() {
project.unshare(cx).detach();
project.unshare(cx);
} else {
project.share(cx).detach();
}