Use closeAllEditors for closeGroup

This commit is contained in:
Logan Ramos 2022-04-11 13:55:55 -04:00
parent 27cb4a5934
commit 783c0f8921
No known key found for this signature in database
GPG key ID: D9CCFF14F0B18183

View file

@ -600,9 +600,7 @@ export class MainThreadEditorTabs implements MainThreadEditorTabsShape {
for (const groupId of groupIds) {
const group = this._editorGroupsService.getGroup(groupId);
if (group) {
// TODO @lramos15 change this to use group.closeAllEditors once it
// is enriched to return a boolean
groupCloseResults.push(await group.closeEditors([...group.editors], { preserveFocus }));
groupCloseResults.push(await group.closeAllEditors());
// Make sure group is empty but still there before removing it
if (group.count === 0 && this._editorGroupsService.getGroup(group.id)) {
this._editorGroupsService.removeGroup(group);