mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-05 10:20:51 +00:00
Do not push invisible local worktrees into recent documents (#10112)
Follow-up of https://github.com/zed-industries/zed/pull/9919 that removes invisible worktrees from the list, to avoid things like ![image](https://github.com/zed-industries/zed/assets/2690773/90ce1c29-a1dd-4a03-b09a-effdba620c8f) Release Notes: - N/A
This commit is contained in:
parent
9aad30a559
commit
58aec1de75
1 changed files with 6 additions and 4 deletions
|
@ -6853,10 +6853,12 @@ impl Project {
|
||||||
project
|
project
|
||||||
.update(&mut cx, |project, cx| project.add_worktree(&worktree, cx))?;
|
.update(&mut cx, |project, cx| project.add_worktree(&worktree, cx))?;
|
||||||
|
|
||||||
cx.update(|cx| {
|
if visible {
|
||||||
cx.add_recent_document(&path);
|
cx.update(|cx| {
|
||||||
})
|
cx.add_recent_document(&path);
|
||||||
.log_err();
|
})
|
||||||
|
.log_err();
|
||||||
|
}
|
||||||
|
|
||||||
Ok(worktree)
|
Ok(worktree)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue