From 1e755aa00f73b3d7897a1c4e6f4030ac31db0006 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 15 Jan 2024 17:02:20 -0800 Subject: [PATCH] Notify global observers when removing a global --- crates/gpui/src/app.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs index 17f92efb58..41519f0ae4 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(&mut self) -> G { let global_type = TypeId::of::(); + self.push_effect(Effect::NotifyGlobalObservers { global_type }); *self .globals_by_type .remove(&global_type)