Skip to content

Commit

Permalink
fix: use spawn instead use_future closes #150 (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
b-avb authored Oct 24, 2024
1 parent b32b8ad commit d67f4f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/use_notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl UseNotificationState {
pub fn handle_notification(&mut self, item: NotificationItem) {
let mut inner = self.inner.clone();
*inner.write() = item;
use_future(move || async move {
spawn(async move {
TimeoutFuture::new(3000).await;
*inner.write() = NotificationItem::default();
});
Expand Down

0 comments on commit d67f4f9

Please sign in to comment.