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
|
@ -62,6 +62,7 @@ pub struct WorktreeStore {
|
|||
pub enum WorktreeStoreEvent {
|
||||
WorktreeAdded(Model<Worktree>),
|
||||
WorktreeRemoved(EntityId, WorktreeId),
|
||||
WorktreeReleased(EntityId, WorktreeId),
|
||||
WorktreeOrderChanged,
|
||||
WorktreeUpdateSent(Model<Worktree>),
|
||||
}
|
||||
|
@ -394,6 +395,10 @@ impl WorktreeStore {
|
|||
|
||||
let handle_id = worktree.entity_id();
|
||||
cx.observe_release(worktree, move |this, worktree, cx| {
|
||||
cx.emit(WorktreeStoreEvent::WorktreeReleased(
|
||||
handle_id,
|
||||
worktree.id(),
|
||||
));
|
||||
cx.emit(WorktreeStoreEvent::WorktreeRemoved(
|
||||
handle_id,
|
||||
worktree.id(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue