@@ -10,7 +10,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
10
10
import { INotificationService } from 'vs/platform/notification/common/notification' ;
11
11
import { Emitter , Event } from 'vs/base/common/event' ;
12
12
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' ;
14
14
import { Disposable , DisposableStore , IDisposable , toDisposable } from 'vs/base/common/lifecycle' ;
15
15
import { IDialogService , IFileDialogService , IPromptButton } from 'vs/platform/dialogs/common/dialogs' ;
16
16
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity' ;
@@ -767,10 +767,7 @@ class UserDataProfilePreviewViewPane extends TreeViewPane {
767
767
super . renderTreeView ( DOM . append ( container , DOM . $ ( '.profile-view-tree-container' ) ) ) ;
768
768
this . messageContainer = DOM . append ( container , DOM . $ ( '.profile-view-message-container.hide' ) ) ;
769
769
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 ( ) ) ) ;
774
771
this . computeAndLayout ( ) ;
775
772
this . _register ( Event . any ( this . userDataProfileData . onDidChangeRoots , this . treeView . onDidCollapseItem , this . treeView . onDidExpandItem ) ( ( ) => this . computeAndLayout ( ) ) ) ;
776
773
}
@@ -897,27 +894,6 @@ abstract class UserDataProfileImportExportState extends Disposable implements IT
897
894
}
898
895
}
899
896
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
-
921
897
async getChildren ( element ?: ITreeItem ) : Promise < ITreeItem [ ] | undefined > {
922
898
if ( element ) {
923
899
return ( < IProfileResourceTreeItem > element ) . getChildren ( ) ;
0 commit comments