Skip to content

Commit

Permalink
only register workspace trust request handler
Browse files Browse the repository at this point in the history
when trust is enabled
  • Loading branch information
sbatten committed Apr 16, 2021
1 parent 3e8b31b commit d66d392
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ export class WorkspaceTrustRequestHandler extends Disposable implements IWorkben
) {
super();

this.registerListeners();

this.showIntroductionModal();
if (isWorkspaceTrustEnabled(configurationService)) {
this.registerListeners();
this.showIntroductionModal();
}
}

private toggleRequestBadge(visible: boolean): void {
Expand All @@ -82,7 +83,7 @@ export class WorkspaceTrustRequestHandler extends Disposable implements IWorkben

private showIntroductionModal(): void {
const workspaceTrustIntroDialogDoNotShowAgainKey = 'workspace.trust.introduction.doNotShowAgain';
const doNotShowAgain = this.storageService.getBoolean(workspaceTrustIntroDialogDoNotShowAgainKey, StorageScope.GLOBAL, true);
const doNotShowAgain = this.storageService.getBoolean(workspaceTrustIntroDialogDoNotShowAgainKey, StorageScope.GLOBAL, false);
if (!doNotShowAgain && this.shouldShowIntroduction) {
// Show welcome dialog
(async () => {
Expand Down

0 comments on commit d66d392

Please sign in to comment.