workspace: Make Item::clone_on_split async (#41211)
Split out from https://github.com/zed-industries/zed/pull/40774 to reduce the size of the reland of that PR (once I figure out the cause of the issue) Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
@@ -383,14 +383,14 @@ impl Item for Onboarding {
|
||||
_workspace_id: Option<WorkspaceId>,
|
||||
_: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Option<Entity<Self>> {
|
||||
Some(cx.new(|cx| Onboarding {
|
||||
) -> Task<Option<Entity<Self>>> {
|
||||
Task::ready(Some(cx.new(|cx| Onboarding {
|
||||
workspace: self.workspace.clone(),
|
||||
user_store: self.user_store.clone(),
|
||||
scroll_handle: ScrollHandle::new(),
|
||||
focus_handle: cx.focus_handle(),
|
||||
_settings_subscription: cx.observe_global::<SettingsStore>(move |_, cx| cx.notify()),
|
||||
}))
|
||||
})))
|
||||
}
|
||||
|
||||
fn to_item_events(event: &Self::Event, mut f: impl FnMut(workspace::item::ItemEvent)) {
|
||||
|
||||
Reference in New Issue
Block a user