Ensure worktree is registered/shared synchronously
This commit is contained in:
parent
530f15b46b
commit
53327e2bf0
3 changed files with 61 additions and 42 deletions
|
@ -2396,17 +2396,18 @@ impl Project {
|
|||
});
|
||||
|
||||
if let Some(project_id) = remote_project_id {
|
||||
worktree
|
||||
.update(&mut cx, |worktree, cx| {
|
||||
worktree.as_local_mut().unwrap().register(project_id, cx)
|
||||
})
|
||||
.await?;
|
||||
if is_shared {
|
||||
worktree
|
||||
.update(&mut cx, |worktree, cx| {
|
||||
worktree.as_local_mut().unwrap().share(project_id, cx)
|
||||
})
|
||||
.await?;
|
||||
} else {
|
||||
worktree
|
||||
.update(&mut cx, |worktree, cx| {
|
||||
worktree.as_local_mut().unwrap().register(project_id, cx)
|
||||
})
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue