fix: toaster behind feature gate
This commit is contained in:
parent
4da66f8cc0
commit
928b714d14
3 changed files with 5 additions and 6 deletions
2
iced
2
iced
|
|
@ -1 +1 @@
|
|||
Subproject commit 4c609e776a7721bddb6d50b60096f4d1f655491c
|
||||
Subproject commit 6f83a8d16447b2590cb081f3e0f294678cc6caaf
|
||||
|
|
@ -350,4 +350,5 @@ pub mod warning;
|
|||
#[doc(inline)]
|
||||
pub use warning::*;
|
||||
|
||||
pub mod toaster;
|
||||
#[cfg(any(feature = "winit", feature = "wayland"))]
|
||||
pub mod toaster;
|
||||
|
|
|
|||
|
|
@ -144,10 +144,7 @@ pub struct ToastMessage(u32);
|
|||
|
||||
impl<Message> Toasts<Message> {
|
||||
/// Add a new [`Toast`]
|
||||
pub fn push(
|
||||
&mut self,
|
||||
mut toast: Toast<Message>,
|
||||
) -> Command<Message>
|
||||
pub fn push(&mut self, mut toast: Toast<Message>) -> Command<Message>
|
||||
where
|
||||
Message: From<ToastMessage>,
|
||||
{
|
||||
|
|
@ -164,6 +161,7 @@ impl<Message> Toasts<Message> {
|
|||
self.toasts.push_back(toast);
|
||||
|
||||
crate::command::future(async move {
|
||||
#[cfg(feature = "tokio")]
|
||||
tokio::time::sleep(duration).await;
|
||||
crate::app::Message::App(Message::from(message))
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue