Emit an event when adding a worktree to a project
This commit is contained in:
parent
04bd57b2c7
commit
a1a4c70845
2 changed files with 13 additions and 10 deletions
|
@ -139,6 +139,7 @@ pub struct Collaborator {
|
|||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum Event {
|
||||
ActiveEntryChanged(Option<ProjectEntryId>),
|
||||
WorktreeAdded,
|
||||
WorktreeRemoved(WorktreeId),
|
||||
DiskBasedDiagnosticsStarted,
|
||||
DiskBasedDiagnosticsUpdated,
|
||||
|
@ -3637,6 +3638,7 @@ impl Project {
|
|||
self.worktrees
|
||||
.push(WorktreeHandle::Weak(worktree.downgrade()));
|
||||
}
|
||||
cx.emit(Event::WorktreeAdded);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue