diff --git a/crates/diagnostics/src/items.rs b/crates/diagnostics/src/items.rs index c3733018b67e0142115c3baac2d8a068d5f6e328..8d3c2fedd6d9d65d7d28e0a88f05f1e85161d117 100644 --- a/crates/diagnostics/src/items.rs +++ b/crates/diagnostics/src/items.rs @@ -38,6 +38,10 @@ impl DiagnosticIndicator { this.in_progress_checks.remove(language_server_id); cx.notify(); } + project::Event::DiagnosticsUpdated { .. } => { + this.summary = project.read(cx).diagnostic_summary(cx); + cx.notify(); + } _ => {} }) .detach(); diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs index a50e02a631ccda81f1d40c49cc3361c1626a383d..f734cd67b3e9b5c32aaf9be940b9f3cb1a3d14e6 100644 --- a/crates/project/src/project.rs +++ b/crates/project/src/project.rs @@ -2867,8 +2867,8 @@ impl Project { move |mut params, mut cx| { let this = this; let adapter = adapter.clone(); - adapter.process_diagnostics(&mut params); if let Some(this) = this.upgrade(&cx) { + adapter.process_diagnostics(&mut params); this.update(&mut cx, |this, cx| { this.update_diagnostics( server_id,