Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Notify global observers when removing a global

Max Brunsfeld1e755aa00f73
diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs
index 17f92efb581..41519f0ae4d 100644
--- a/crates/gpui/src/app.rs
+++ b/crates/gpui/src/app.rs
@@ -843,6 +843,7 @@ impl AppContext {
/// Remove the global of the given type from the app context. Does not notify global observers.
pub fn remove_global<G: Any>(&mut self) -> G {
let global_type = TypeId::of::<G>();
+ self.push_effect(Effect::NotifyGlobalObservers { global_type });
*self
.globals_by_type
.remove(&global_type)