Cleanup worktrees' shared state when unsharing
This commit is contained in:
parent
5415663a73
commit
f51cf6b05e
4 changed files with 62 additions and 21 deletions
|
@ -428,6 +428,11 @@ impl Project {
|
|||
rpc.send(proto::UnshareProject { project_id }).await?;
|
||||
this.update(&mut cx, |this, cx| {
|
||||
this.collaborators.clear();
|
||||
for worktree in &this.worktrees {
|
||||
worktree.update(cx, |worktree, _| {
|
||||
worktree.as_local_mut().unwrap().unshare();
|
||||
});
|
||||
}
|
||||
cx.notify()
|
||||
});
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue