@@ -290,21 +290,15 @@ impl RenderOnce for Shell {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Wraps the layout in a window frame
|
// Wraps the layout in a window frame
|
||||||
let mut shell = frame(layout, window, cx);
|
frame(layout, window, cx)
|
||||||
|
.when(cfg!(feature = "toast"), |this| {
|
||||||
#[cfg(feature = "toast")]
|
|
||||||
{
|
|
||||||
let toasts = state.read(cx).toasts.clone();
|
let toasts = state.read(cx).toasts.clone();
|
||||||
shell = shell.child(ToastsView::new((id.clone(), "toasts"), toasts));
|
this.child(ToastsView::new((id.clone(), "toasts"), toasts))
|
||||||
}
|
})
|
||||||
|
.when(cfg!(feature = "alert"), |this| {
|
||||||
#[cfg(feature = "alert")]
|
|
||||||
{
|
|
||||||
let alerts = state.read(cx).alerts.clone();
|
let alerts = state.read(cx).alerts.clone();
|
||||||
shell = shell.child(AlertsView::new((id, "alerts"), alerts));
|
this.child(AlertsView::new((id, "alerts"), alerts))
|
||||||
}
|
})
|
||||||
|
|
||||||
shell
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user