소스 검색

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

main
Eric Amodio 7 년 전
부모
커밋
ca71d5d0ed
2개의 변경된 파일11개의 추가작업 그리고 9개의 파일을 삭제
  1. +7
    -6
      src/views/gitExplorer.ts
  2. +4
    -3
      src/views/resultsExplorer.ts

+ 7
- 6
src/views/gitExplorer.ts 파일 보기

@ -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 파일 보기

@ -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();
}

불러오는 중...
취소
저장