Change summary
crates/onboarding/src/onboarding.rs | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
Detailed changes
@@ -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)) {