Skip to content

Commit 98f0b61

Browse files
authored
Revert "only show notification once per window reload (#125548)"
This reverts commit de98ebb.
1 parent de98ebb commit 98f0b61

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vs/workbench/contrib/terminal/browser/terminalInstance.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ const NUMBER_OF_FRAMES_TO_MEASURE = 20;
6868

6969
const SHOULD_PROMPT_FOR_PROFILE_MIGRATION_KEY = 'terminals.integrated.profile-migration';
7070

71-
let migrationMessageShown = false;
72-
7371
const enum Constants {
7472
/**
7573
* The maximum amount of milliseconds to wait for a container before starting to create the
@@ -145,6 +143,8 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
145143

146144
private _hasHadInput: boolean;
147145

146+
messageShown: boolean = false;
147+
148148
readonly statusList: ITerminalStatusList = new TerminalStatusList();
149149
disableLayout: boolean = false;
150150
get instanceId(): number { return this._instanceId; }
@@ -362,7 +362,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
362362
const shouldMigrateToProfile = (!!this._configurationService.getValue(TerminalSettingPrefix.Shell + platform) ||
363363
!!this._configurationService.inspect(TerminalSettingPrefix.ShellArgs + platform).userValue) &&
364364
!!this._configurationService.getValue(TerminalSettingPrefix.DefaultProfile + platform);
365-
if (shouldMigrateToProfile && this._storageService.getBoolean(SHOULD_PROMPT_FOR_PROFILE_MIGRATION_KEY, StorageScope.WORKSPACE, true) && !migrationMessageShown) {
365+
if (shouldMigrateToProfile && this._storageService.getBoolean(SHOULD_PROMPT_FOR_PROFILE_MIGRATION_KEY, StorageScope.WORKSPACE, true) && !this.messageShown) {
366366
this._notificationService.prompt(
367367
Severity.Info,
368368
nls.localize('terminalProfileMigration', "The terminal is using deprecated shell/shellArgs settings, do you want to migrate it to a profile?"),
@@ -396,7 +396,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
396396
neverShowAgain: { id: SHOULD_PROMPT_FOR_PROFILE_MIGRATION_KEY, scope: NeverShowAgainScope.WORKSPACE }
397397
}
398398
);
399-
migrationMessageShown = true;
399+
this.messageShown = true;
400400
}
401401
}
402402

0 commit comments

Comments
 (0)