Fix workspace update notifications not being suppressed (#30180)

Kirill Bulatov created

Follow-up of https://github.com/zed-industries/zed/pull/30015

Release Notes:

- N/A

Change summary

crates/workspace/src/notifications.rs | 7 +++++++
1 file changed, 7 insertions(+)

Detailed changes

crates/workspace/src/notifications.rs 🔗

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