Skip to content

Commit 3873c58

Browse files
If the setting value is the same, do nothing (microsoft#223518)
It seems like this event fires in Codespaces... my _guess_ is that Codespaces basically overwrites all the settings from settings sync which causes this event to fire. It's surprising to me that this event fires even though the value hasn't changed. I can't repro this with the test resolver, and I also cant have Codespaces use Code - OSS, so we'll just have to see how this goes. This _should_ do the trick though. Fixes microsoft#223508
1 parent afe1dc6 commit 3873c58

File tree

1 file changed

+4
-0
lines changed
  • extensions/github-authentication/src

1 file changed

+4
-0
lines changed

extensions/github-authentication/src/github.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
142142
this.context.secrets.onDidChange(() => this.checkForUpdates()),
143143
vscode.workspace.onDidChangeConfiguration(async e => {
144144
if (e.affectsConfiguration('github.experimental.multipleAccounts')) {
145+
const newValue = vscode.workspace.getConfiguration('github.experimental').get<boolean>('multipleAccounts', false);
146+
if (newValue === this._supportsMultipleAccounts) {
147+
return;
148+
}
145149
const result = await vscode.window.showInformationMessage(vscode.l10n.t('Please reload the window to apply the new setting.'), { modal: true }, vscode.l10n.t('Reload Window'));
146150
if (result) {
147151
vscode.commands.executeCommand('workbench.action.reloadWindow');

0 commit comments

Comments
 (0)