Start a call when clicking on a contact in the contacts popover
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
parent
815cf44647
commit
8ff4f044b7
9 changed files with 229 additions and 53 deletions
|
@ -1519,6 +1519,17 @@ impl MutableAppContext {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn observe_default_global<G, F>(&mut self, observe: F) -> Subscription
|
||||
where
|
||||
G: Any + Default,
|
||||
F: 'static + FnMut(&mut MutableAppContext),
|
||||
{
|
||||
if !self.has_global::<G>() {
|
||||
self.set_global(G::default());
|
||||
}
|
||||
self.observe_global::<G, F>(observe)
|
||||
}
|
||||
|
||||
pub fn observe_release<E, H, F>(&mut self, handle: &H, callback: F) -> Subscription
|
||||
where
|
||||
E: Entity,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue