crates/workspace/src/notifications.rs 🔗
@@ -811,6 +811,13 @@ pub fn show_app_notification<V: Notification + 'static>(
}
})
.detach();
+ cx.subscribe(¬ification, {
+ let id = id.clone();
+ move |workspace: &mut Workspace, _, _: &SuppressEvent, cx| {
+ workspace.suppress_notification(&id, cx);
+ }
+ })
+ .detach();
notification.into()
}
});