Skip to content

Commit 8417c87

Browse files
authored
1 parent 636dbcf commit 8417c87

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.ts

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
1010
import { INotificationService } from 'vs/platform/notification/common/notification';
1111
import { Emitter, Event } from 'vs/base/common/event';
1212
import * as DOM from 'vs/base/browser/dom';
13-
import { IUserDataProfileImportExportService, PROFILE_FILTER, PROFILE_EXTENSION, IUserDataProfileContentHandler, IS_PROFILE_IMPORT_IN_PROGRESS_CONTEXT, PROFILES_TITLE, defaultUserDataProfileIcon, IUserDataProfileService, IProfileResourceTreeItem, IProfileResourceChildTreeItem, PROFILES_CATEGORY, IUserDataProfileManagementService, ProfileResourceType, IS_PROFILE_EXPORT_IN_PROGRESS_CONTEXT, ISaveProfileResult, IProfileImportOptions, PROFILE_URL_AUTHORITY, toUserDataProfileUri } from 'vs/workbench/services/userDataProfile/common/userDataProfile';
13+
import { IUserDataProfileImportExportService, PROFILE_FILTER, PROFILE_EXTENSION, IUserDataProfileContentHandler, IS_PROFILE_IMPORT_IN_PROGRESS_CONTEXT, PROFILES_TITLE, defaultUserDataProfileIcon, IUserDataProfileService, IProfileResourceTreeItem, PROFILES_CATEGORY, IUserDataProfileManagementService, ProfileResourceType, IS_PROFILE_EXPORT_IN_PROGRESS_CONTEXT, ISaveProfileResult, IProfileImportOptions, PROFILE_URL_AUTHORITY, toUserDataProfileUri } from 'vs/workbench/services/userDataProfile/common/userDataProfile';
1414
import { Disposable, DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
1515
import { IDialogService, IFileDialogService, IPromptButton } from 'vs/platform/dialogs/common/dialogs';
1616
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity';
@@ -767,10 +767,7 @@ class UserDataProfilePreviewViewPane extends TreeViewPane {
767767
super.renderTreeView(DOM.append(container, DOM.$('.profile-view-tree-container')));
768768
this.messageContainer = DOM.append(container, DOM.$('.profile-view-message-container.hide'));
769769
this.createButtons(container);
770-
this._register(this.treeView.onDidChangeCheckboxState(items => {
771-
this.treeView.refresh(this.userDataProfileData.onDidChangeCheckboxState(items));
772-
this.updateConfirmButtonEnablement();
773-
}));
770+
this._register(this.treeView.onDidChangeCheckboxState(() => this.updateConfirmButtonEnablement()));
774771
this.computeAndLayout();
775772
this._register(Event.any(this.userDataProfileData.onDidChangeRoots, this.treeView.onDidCollapseItem, this.treeView.onDidExpandItem)(() => this.computeAndLayout()));
776773
}
@@ -897,27 +894,6 @@ abstract class UserDataProfileImportExportState extends Disposable implements IT
897894
}
898895
}
899896

900-
onDidChangeCheckboxState(items: readonly ITreeItem[]): readonly ITreeItem[] {
901-
const toRefresh: ITreeItem[] = [];
902-
for (const item of items) {
903-
if (item.children) {
904-
for (const child of item.children) {
905-
if (child.checkbox) {
906-
child.checkbox.isChecked = !!item.checkbox?.isChecked;
907-
}
908-
}
909-
toRefresh.push(item);
910-
} else {
911-
const parent = (<IProfileResourceChildTreeItem>item).parent;
912-
if (item.checkbox?.isChecked && parent?.checkbox) {
913-
parent.checkbox.isChecked = true;
914-
toRefresh.push(parent);
915-
}
916-
}
917-
}
918-
return items;
919-
}
920-
921897
async getChildren(element?: ITreeItem): Promise<ITreeItem[] | undefined> {
922898
if (element) {
923899
return (<IProfileResourceTreeItem>element).getChildren();

0 commit comments

Comments
 (0)