Notify global observers when removing a global

Max Brunsfeld created

Change summary

crates/gpui/src/app.rs | 1 +
1 file changed, 1 insertion(+)

Detailed changes

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)