Do not remove worktrees after the headless server removal (#19556)
Release Notes: - N/A Co-authored-by: Conrad Irwin <conrad@zed.dev>
This commit is contained in:
parent
291ca2c32c
commit
edda149d75
5 changed files with 12 additions and 4 deletions
|
@ -2223,9 +2223,11 @@ impl Project {
|
|||
cx.emit(Event::WorktreeAdded);
|
||||
}
|
||||
WorktreeStoreEvent::WorktreeRemoved(_, id) => {
|
||||
self.on_worktree_removed(*id, cx);
|
||||
cx.emit(Event::WorktreeRemoved(*id));
|
||||
}
|
||||
WorktreeStoreEvent::WorktreeReleased(_, id) => {
|
||||
self.on_worktree_released(*id, cx);
|
||||
}
|
||||
WorktreeStoreEvent::WorktreeOrderChanged => cx.emit(Event::WorktreeOrderChanged),
|
||||
WorktreeStoreEvent::WorktreeUpdateSent(_) => {}
|
||||
}
|
||||
|
@ -2261,7 +2263,7 @@ impl Project {
|
|||
cx.notify();
|
||||
}
|
||||
|
||||
fn on_worktree_removed(&mut self, id_to_remove: WorktreeId, cx: &mut ModelContext<Self>) {
|
||||
fn on_worktree_released(&mut self, id_to_remove: WorktreeId, cx: &mut ModelContext<Self>) {
|
||||
if let Some(dev_server_project_id) = self.dev_server_project_id {
|
||||
let paths: Vec<String> = self
|
||||
.visible_worktrees(cx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue