added workspace event for WorkspaceCreated
This commit is contained in:
parent
90d532f0ba
commit
b148c61047
1 changed files with 3 additions and 3 deletions
|
@ -544,6 +544,7 @@ impl DelayedDebouncedEditAction {
|
||||||
pub enum Event {
|
pub enum Event {
|
||||||
PaneAdded(View<Pane>),
|
PaneAdded(View<Pane>),
|
||||||
ContactRequestedJoin(u64),
|
ContactRequestedJoin(u64),
|
||||||
|
WorkspaceCreated(WeakView<Workspace>),
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Workspace {
|
pub struct Workspace {
|
||||||
|
@ -697,8 +698,7 @@ impl Workspace {
|
||||||
Ok(())
|
Ok(())
|
||||||
});
|
});
|
||||||
|
|
||||||
// todo!("replace with a different mechanism")
|
cx.emit(Event::WorkspaceCreated(weak_handle.clone()));
|
||||||
// cx.emit_global(WorkspaceCreated(weak_handle.clone()));
|
|
||||||
|
|
||||||
let left_dock = cx.build_view(|_| Dock::new(DockPosition::Left));
|
let left_dock = cx.build_view(|_| Dock::new(DockPosition::Left));
|
||||||
let bottom_dock = cx.build_view(|_| Dock::new(DockPosition::Bottom));
|
let bottom_dock = cx.build_view(|_| Dock::new(DockPosition::Bottom));
|
||||||
|
@ -4250,7 +4250,7 @@ impl ViewId {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// pub struct WorkspaceCreated(pub WeakView<Workspace>);
|
pub struct WorkspaceCreated(pub WeakView<Workspace>);
|
||||||
|
|
||||||
pub fn activate_workspace_for_project(
|
pub fn activate_workspace_for_project(
|
||||||
cx: &mut AppContext,
|
cx: &mut AppContext,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue