@@ -10,7 +10,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
1010import { INotificationService } from 'vs/platform/notification/common/notification' ;
1111import { Emitter , Event } from 'vs/base/common/event' ;
1212import * 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' ;
1414import { Disposable , DisposableStore , IDisposable , toDisposable } from 'vs/base/common/lifecycle' ;
1515import { IDialogService , IFileDialogService , IPromptButton } from 'vs/platform/dialogs/common/dialogs' ;
1616import { 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