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

@ -344,7 +344,9 @@ fn quit(_: &Quit, cx: &mut gpui::MutableAppContext) {
// If the user cancels any save prompt, then keep the app open.
for workspace in workspaces {
if !workspace
.update(&mut cx, |workspace, cx| workspace.prepare_to_close(cx))
.update(&mut cx, |workspace, cx| {
workspace.prepare_to_close(true, cx)
})
.await?
{
return Ok(());