From b148c610479f5bf10b2a70625b886e6156f58a50 Mon Sep 17 00:00:00 2001 From: KCaverly Date: Fri, 3 Nov 2023 08:52:18 -0400 Subject: [PATCH] added workspace event for WorkspaceCreated --- crates/workspace2/src/workspace2.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/workspace2/src/workspace2.rs b/crates/workspace2/src/workspace2.rs index bb9cb7e527..48f4ae21cd 100644 --- a/crates/workspace2/src/workspace2.rs +++ b/crates/workspace2/src/workspace2.rs @@ -544,6 +544,7 @@ impl DelayedDebouncedEditAction { pub enum Event { PaneAdded(View), ContactRequestedJoin(u64), + WorkspaceCreated(WeakView), } pub struct Workspace { @@ -697,8 +698,7 @@ impl Workspace { Ok(()) }); - // todo!("replace with a different mechanism") - // cx.emit_global(WorkspaceCreated(weak_handle.clone())); + cx.emit(Event::WorkspaceCreated(weak_handle.clone())); let left_dock = cx.build_view(|_| Dock::new(DockPosition::Left)); let bottom_dock = cx.build_view(|_| Dock::new(DockPosition::Bottom)); @@ -4250,7 +4250,7 @@ impl ViewId { // } // } -// pub struct WorkspaceCreated(pub WeakView); +pub struct WorkspaceCreated(pub WeakView); pub fn activate_workspace_for_project( cx: &mut AppContext,