Browse Source

Fixes issue where section fn was reused (won't work)

main
Eric Amodio 7 years ago
parent
commit
ca71d5d0ed
2 changed files with 11 additions and 9 deletions
  1. +7
    -6
      src/views/gitExplorer.ts
  2. +4
    -3
      src/views/resultsExplorer.ts

+ 7
- 6
src/views/gitExplorer.ts View File

@ -70,18 +70,19 @@ export class GitExplorer implements TreeDataProvider {
private async onConfigurationChanged(e: ConfigurationChangeEvent) {
const initializing = configuration.initializing(e);
const section = configuration.name('gitExplorer');
if (!initializing && !configuration.changed(e, section.value)) return;
if (!initializing && !configuration.changed(e, configuration.name('gitExplorer').value)) return;
if (!initializing && (configuration.changed(e, section('gravatars').value) || configuration.changed(e, section('gravatarsDefault').value))) {
if (!initializing &&
(configuration.changed(e, configuration.name('gitExplorer')('gravatars').value) ||
configuration.changed(e, configuration.name('gitExplorer')('gravatarsDefault').value))) {
clearGravatarCache();
}
if (initializing || configuration.changed(e, section('autoRefresh').value)) {
this.setAutoRefresh(configuration.get<boolean>(section('autoRefresh').value));
if (initializing || configuration.changed(e, configuration.name('gitExplorer')('autoRefresh').value)) {
this.setAutoRefresh(configuration.get<boolean>(configuration.name('gitExplorer')('autoRefresh').value));
}
let view = configuration.get<GitExplorerView>(section('view').value);
let view = configuration.get<GitExplorerView>(configuration.name('gitExplorer')('view').value);
if (view === GitExplorerView.Auto) {
view = Container.context.workspaceState.get<GitExplorerView>(WorkspaceState.GitExplorerView, GitExplorerView.Repository);
}

+ 4
- 3
src/views/resultsExplorer.ts View File

@ -44,10 +44,11 @@ export class ResultsExplorer implements TreeDataProvider {
private async onConfigurationChanged(e: ConfigurationChangeEvent) {
const initializing = configuration.initializing(e);
const section = configuration.name('resultsExplorer');
if (!initializing && !configuration.changed(e, section.value)) return;
if (!initializing && !configuration.changed(e, configuration.name('resultsExplorer').value)) return;
if (!initializing && (configuration.changed(e, section('gravatars').value) || configuration.changed(e, section('gravatarsDefault').value))) {
if (!initializing &&
(configuration.changed(e, configuration.name('resultsExplorer')('gravatars').value) ||
configuration.changed(e, configuration.name('resultsExplorer')('gravatarsDefault').value))) {
clearGravatarCache();
}

Loading…
Cancel
Save