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
|
// 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 => {
|
context.subscriptions.push(vscode.workspace.onDidChangeConfiguration(async e => {
|
||||||
if (e.affectsConfiguration('github-authentication.useElectronFetch')) {
|
if (e.affectsConfiguration('github-authentication.useElectronFetch')) {
|
||||||
const selection = await vscode.window.showInformationMessage(
|
const afterFetchSetting = vscode.workspace.getConfiguration('github-authentication').get<boolean>('useElectronFetch');
|
||||||
vscode.l10n.t('GitHub Authentication - Reload required'),
|
if (beforeFetchSetting !== afterFetchSetting) {
|
||||||
{
|
beforeFetchSetting = afterFetchSetting;
|
||||||
modal: true,
|
const selection = await vscode.window.showInformationMessage(
|
||||||
detail: vscode.l10n.t('A reload is required for the fetch setting change to take effect.')
|
vscode.l10n.t('GitHub Authentication - Reload required'),
|
||||||
},
|
{
|
||||||
vscode.l10n.t('Reload Window')
|
modal: true,
|
||||||
);
|
detail: vscode.l10n.t('A reload is required for the fetch setting change to take effect.')
|
||||||
if (selection) {
|
},
|
||||||
await vscode.commands.executeCommand('workbench.action.reloadWindow');
|
vscode.l10n.t('Reload Window')
|
||||||
|
);
|
||||||
|
if (selection) {
|
||||||
|
await vscode.commands.executeCommand('workbench.action.reloadWindow');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|||||||
Reference in New Issue
Block a user