This commit is contained in:
Antonio Scandurra
2021-06-18 19:28:39 +02:00
parent 89d25458ac
commit f9d8e952f2
5 changed files with 76 additions and 17 deletions
+3 -1
View File
@@ -729,7 +729,9 @@ impl Workspace {
.worktree
.ok_or_else(|| anyhow!("empty worktree"))?;
this.update(&mut cx, |workspace, cx| {
let worktree = cx.add_model(|cx| Worktree::remote(worktree, cx));
let worktree = cx.add_model(|cx| {
Worktree::remote(worktree_id, worktree, rpc, connection_id, cx)
});
cx.observe_model(&worktree, |_, _, cx| cx.notify());
workspace.worktrees.insert(worktree);
cx.notify();