Fix notebook results grid settings not updating (#11413)

* added boolean for results grid settings changed

* change parameter name to forceThemeUpdate
This commit is contained in:
Lucy Zhang
2020-07-20 10:28:27 -07:00
committed by GitHub
parent decba446dd
commit 66632e6262

View File

@@ -20,19 +20,20 @@ export class NotebookThemingContribution extends Disposable implements IWorkbenc
private hookNotebookThemesAndConfigListener(): void {
if (this.configurationService) {
this.updateNotebookThemes();
this.updateNotebookThemes(false);
this._register(this.configurationService.onDidChangeConfiguration(e => {
let affectsResultsGrid = e.affectsConfiguration('resultsGrid');
if (e.affectsConfiguration(OVERRIDE_EDITOR_THEMING_SETTING)
|| e.affectsConfiguration('resultsGrid')) {
this.updateNotebookThemes();
|| affectsResultsGrid) {
this.updateNotebookThemes(affectsResultsGrid);
}
}));
}
}
private updateNotebookThemes() {
private updateNotebookThemes(forceThemeUpdate: boolean) {
let overrideEditorSetting = this.configurationService.getValue<boolean>(OVERRIDE_EDITOR_THEMING_SETTING);
if (overrideEditorSetting !== this.overrideEditorThemeSetting) {
if (overrideEditorSetting !== this.overrideEditorThemeSetting || forceThemeUpdate) {
// Re-add the participant since this will trigger update of theming rules, can't just
// update something and ask to change
if (this.themeParticipant) {