Show prompt when closing last window while there's an active call
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
feb17c29ec
commit
29c3b81a0a
4 changed files with 54 additions and 8 deletions
|
@ -794,6 +794,16 @@ impl AsyncAppContext {
|
|||
self.update(|cx| cx.activate_window(window_id))
|
||||
}
|
||||
|
||||
pub fn prompt(
|
||||
&mut self,
|
||||
window_id: usize,
|
||||
level: PromptLevel,
|
||||
msg: &str,
|
||||
answers: &[&str],
|
||||
) -> oneshot::Receiver<usize> {
|
||||
self.update(|cx| cx.prompt(window_id, level, msg, answers))
|
||||
}
|
||||
|
||||
pub fn platform(&self) -> Arc<dyn Platform> {
|
||||
self.0.borrow().platform()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue