Move more window methods off AsyncAppContext

This commit is contained in:
Nathan Sobo 2023-08-08 11:38:07 -06:00
parent 95cd96e4be
commit b2d9ccc0a2
8 changed files with 73 additions and 64 deletions

View file

@ -416,11 +416,11 @@ fn quit(_: &Quit, cx: &mut gpui::AppContext) {
workspace_windows.sort_by_key(|window| window.is_active(&cx) == Some(false));
if let (true, Some(window)) = (should_confirm, workspace_windows.first().copied()) {
let answer = cx.prompt(
window.into(),
let answer = window.prompt(
PromptLevel::Info,
"Are you sure you want to quit?",
&["Quit", "Cancel"],
&mut cx,
);
if let Some(mut answer) = answer {