Fix workspace update notifications not being suppressed (cherry-pick #30180) (#30205)

gcp-cherry-pick-bot[bot] and Kirill Bulatov created

Cherry-picked Fix workspace update notifications not being suppressed
(#30180)

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

Release Notes:

- N/A

Co-authored-by: Kirill Bulatov <kirill@zed.dev>

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()
                 }
             });