mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Fix GitHub Authentication reload dialog appearing unnecessarily in remote tunnel scenarios (#261257)
This commit is contained in:
@@ -81,18 +81,23 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
}));
|
||||
|
||||
// Listener to prompt for reload when the fetch implementation setting changes
|
||||
let beforeFetchSetting = vscode.workspace.getConfiguration('github-authentication').get<boolean>('useElectronFetch');
|
||||
context.subscriptions.push(vscode.workspace.onDidChangeConfiguration(async e => {
|
||||
if (e.affectsConfiguration('github-authentication.useElectronFetch')) {
|
||||
const selection = await vscode.window.showInformationMessage(
|
||||
vscode.l10n.t('GitHub Authentication - Reload required'),
|
||||
{
|
||||
modal: true,
|
||||
detail: vscode.l10n.t('A reload is required for the fetch setting change to take effect.')
|
||||
},
|
||||
vscode.l10n.t('Reload Window')
|
||||
);
|
||||
if (selection) {
|
||||
await vscode.commands.executeCommand('workbench.action.reloadWindow');
|
||||
const afterFetchSetting = vscode.workspace.getConfiguration('github-authentication').get<boolean>('useElectronFetch');
|
||||
if (beforeFetchSetting !== afterFetchSetting) {
|
||||
beforeFetchSetting = afterFetchSetting;
|
||||
const selection = await vscode.window.showInformationMessage(
|
||||
vscode.l10n.t('GitHub Authentication - Reload required'),
|
||||
{
|
||||
modal: true,
|
||||
detail: vscode.l10n.t('A reload is required for the fetch setting change to take effect.')
|
||||
},
|
||||
vscode.l10n.t('Reload Window')
|
||||
);
|
||||
if (selection) {
|
||||
await vscode.commands.executeCommand('workbench.action.reloadWindow');
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user