Make host reconnection test pass when mutating worktree while offline
This commit is contained in:
parent
1a3940a12e
commit
52babc51a0
7 changed files with 319 additions and 197 deletions
|
@ -1081,6 +1081,17 @@ impl Project {
|
|||
cx: &mut ModelContext<Self>,
|
||||
) -> Result<()> {
|
||||
self.set_collaborators_from_proto(message.collaborators, cx)?;
|
||||
for worktree in self.worktrees.iter() {
|
||||
if let Some(worktree) = worktree.upgrade(&cx) {
|
||||
worktree.update(cx, |worktree, _| {
|
||||
if let Some(worktree) = worktree.as_local_mut() {
|
||||
worktree.reshare()
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
})?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue