This commit is contained in:
Nathan Sobo 2023-08-07 13:54:47 -06:00
parent d4d32611fe
commit 3e0d0e5c01
5 changed files with 221 additions and 78 deletions

View file

@ -4035,16 +4035,9 @@ pub fn restart(_: &Restart, cx: &mut AppContext) {
let should_confirm = settings::get::<WorkspaceSettings>(cx).confirm_quit;
cx.spawn(|mut cx| async move {
let mut workspaces = cx
.window_ids()
.windows()
.into_iter()
.filter_map(|window_id| {
Some(
cx.root_view(window_id)?
.clone()
.downcast::<Workspace>()?
.downgrade(),
)
})
.filter_map(|window| Some(window.downcast::<Workspace>()?.root(&cx)?.downgrade()))
.collect::<Vec<_>>();
// If multiple windows have unsaved changes, and need a save prompt,