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:
Antonio Scandurra 2022-10-11 14:52:47 +02:00
parent feb17c29ec
commit 29c3b81a0a
4 changed files with 54 additions and 8 deletions

View file

@ -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()
}