onboarding: Fix a double lease panic caused by Onboarding::clone_on_split (#35815)
Release Notes: - N/A
This commit is contained in:
parent
327456d1d2
commit
f2435f7284
1 changed files with 7 additions and 3 deletions
|
@ -565,9 +565,13 @@ impl Item for Onboarding {
|
|||
_: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Option<Entity<Self>> {
|
||||
self.workspace
|
||||
.update(cx, |workspace, cx| Onboarding::new(workspace, cx))
|
||||
.ok()
|
||||
Some(cx.new(|cx| Onboarding {
|
||||
workspace: self.workspace.clone(),
|
||||
user_store: self.user_store.clone(),
|
||||
selected_page: self.selected_page,
|
||||
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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue