Skip to content

Commit 26617f8

Browse files
authored
1 parent 5725745 commit 26617f8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export class UserDataProfileImportExportService extends Disposable implements IU
196196
const barrier = new Barrier();
197197
const exportAction = this.getExportAction(barrier, userDataProfilesExportState);
198198
const cancelAction = new BarrierAction(barrier, new Action('cancel', localize('cancel', "Cancel")));
199-
await this.showProfilePreviewView(EXPORT_PROFILE_PREVIEW_VIEW, userDataProfilesExportState.profile.name, [exportAction], cancelAction, userDataProfilesExportState);
199+
await this.showProfilePreviewView(EXPORT_PROFILE_PREVIEW_VIEW, userDataProfilesExportState.profile.name, [exportAction], cancelAction, true, userDataProfilesExportState);
200200
await barrier.wait();
201201
await this.hideProfilePreviewView(EXPORT_PROFILE_PREVIEW_VIEW);
202202
} finally {
@@ -245,7 +245,7 @@ export class UserDataProfileImportExportService extends Disposable implements IU
245245
const barrier = new Barrier();
246246
const exportAction = this.getExportAction(barrier, userDataProfilesExportState);
247247
const closeAction = new BarrierAction(barrier, new Action('close', localize('close', "Close")));
248-
await this.showProfilePreviewView(EXPORT_PROFILE_PREVIEW_VIEW, userDataProfilesExportState.profile.name, [exportAction], closeAction, userDataProfilesExportState);
248+
await this.showProfilePreviewView(EXPORT_PROFILE_PREVIEW_VIEW, userDataProfilesExportState.profile.name, [exportAction], closeAction, true, userDataProfilesExportState);
249249
await barrier.wait();
250250
await this.hideProfilePreviewView(EXPORT_PROFILE_PREVIEW_VIEW);
251251
} finally {
@@ -372,7 +372,7 @@ export class UserDataProfileImportExportService extends Disposable implements IU
372372
? new Action('importInDesktop', localize('import in desktop', "Import {0} profile in {1}", importedProfile.name, this.productService.nameLong), undefined, true, async () => this.openerService.open(uri, { openExternal: true }))
373373
: new BarrierAction(barrier, new Action('close', localize('close', "Close")));
374374

375-
const view = await this.showProfilePreviewView(IMPORT_PROFILE_PREVIEW_VIEW, importedProfile.name, [importAction], secondaryAction, userDataProfileImportState);
375+
const view = await this.showProfilePreviewView(IMPORT_PROFILE_PREVIEW_VIEW, importedProfile.name, [importAction], secondaryAction, false, userDataProfileImportState);
376376
if (!extensions) {
377377
userDataProfileImportState.setDescription(ProfileResourceType.Extensions, localize('not applied', "Not Applied"));
378378
const that = this;
@@ -433,7 +433,7 @@ export class UserDataProfileImportExportService extends Disposable implements IU
433433
if (userDataProfileImportState.isEmpty()) {
434434
await importAction.run();
435435
} else {
436-
await this.showProfilePreviewView(IMPORT_PROFILE_PREVIEW_VIEW, profileTemplate.name, [importAction], new BarrierAction(barrier, new Action('cancel', localize('cancel', "Cancel"))), userDataProfileImportState);
436+
await this.showProfilePreviewView(IMPORT_PROFILE_PREVIEW_VIEW, profileTemplate.name, [importAction], new BarrierAction(barrier, new Action('cancel', localize('cancel', "Cancel"))), false, userDataProfileImportState);
437437
}
438438
await barrier.wait();
439439
await this.hideProfilePreviewView(IMPORT_PROFILE_PREVIEW_VIEW);
@@ -618,10 +618,12 @@ export class UserDataProfileImportExportService extends Disposable implements IU
618618
return nameIndex + 1;
619619
}
620620

621-
private async showProfilePreviewView(id: string, name: string, primary: IAction[], secondary: IAction, userDataProfilesData: UserDataProfileImportExportState): Promise<UserDataProfilePreviewViewPane> {
621+
private async showProfilePreviewView(id: string, name: string, primary: IAction[], secondary: IAction, refreshAction: boolean, userDataProfilesData: UserDataProfileImportExportState): Promise<UserDataProfilePreviewViewPane> {
622622
const viewsRegistry = Registry.as<IViewsRegistry>(Extensions.ViewsRegistry);
623623
const treeView = this.instantiationService.createInstance(TreeView, id, name);
624-
treeView.showRefreshAction = true;
624+
if (refreshAction) {
625+
treeView.showRefreshAction = true;
626+
}
625627
const actionRunner = new ActionRunner();
626628
const descriptor: ITreeViewDescriptor = {
627629
id,

0 commit comments

Comments
 (0)