File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed
extensions/github-authentication/src Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -81,18 +81,23 @@ export function activate(context: vscode.ExtensionContext) {
8181 } ) ) ;
8282
8383 // Listener to prompt for reload when the fetch implementation setting changes
84+ let beforeFetchSetting = vscode . workspace . getConfiguration ( 'github-authentication' ) . get < boolean > ( 'useElectronFetch' ) ;
8485 context . subscriptions . push ( vscode . workspace . onDidChangeConfiguration ( async e => {
8586 if ( e . affectsConfiguration ( 'github-authentication.useElectronFetch' ) ) {
86- const selection = await vscode . window . showInformationMessage (
87- vscode . l10n . t ( 'GitHub Authentication - Reload required' ) ,
88- {
89- modal : true ,
90- detail : vscode . l10n . t ( 'A reload is required for the fetch setting change to take effect.' )
91- } ,
92- vscode . l10n . t ( 'Reload Window' )
93- ) ;
94- if ( selection ) {
95- await vscode . commands . executeCommand ( 'workbench.action.reloadWindow' ) ;
87+ const afterFetchSetting = vscode . workspace . getConfiguration ( 'github-authentication' ) . get < boolean > ( 'useElectronFetch' ) ;
88+ if ( beforeFetchSetting !== afterFetchSetting ) {
89+ beforeFetchSetting = afterFetchSetting ;
90+ const selection = await vscode . window . showInformationMessage (
91+ vscode . l10n . t ( 'GitHub Authentication - Reload required' ) ,
92+ {
93+ modal : true ,
94+ detail : vscode . l10n . t ( 'A reload is required for the fetch setting change to take effect.' )
95+ } ,
96+ vscode . l10n . t ( 'Reload Window' )
97+ ) ;
98+ if ( selection ) {
99+ await vscode . commands . executeCommand ( 'workbench.action.reloadWindow' ) ;
100+ }
96101 }
97102 }
98103 } ) ) ;
You can’t perform that action at this time.
0 commit comments