소스 검색

Fixes GitLens view refreshing

main
Eric Amodio 6 년 전
부모
커밋
26856a6a6a
2개의 변경된 파일19개의 추가작업 그리고 12개의 파일을 삭제
  1. +18
    -12
      src/views/gitExplorer.ts
  2. +1
    -0
      src/views/resultsExplorer.ts

+ 18
- 12
src/views/gitExplorer.ts 파일 보기

@ -74,6 +74,7 @@ export class GitExplorer extends Disposable implements TreeDataProvider
if (!initializing &&
!configuration.changed(e, configuration.name('gitExplorer').value) &&
!configuration.changed(e, configuration.name('explorers').value) &&
!configuration.changed(e, configuration.name('defaultGravatarsStyle').value)) return;
if (initializing || configuration.changed(e, configuration.name('gitExplorer')('enabled').value)) {
@ -84,22 +85,27 @@ export class GitExplorer extends Disposable implements TreeDataProvider
this.setAutoRefresh(Container.config.gitExplorer.autoRefresh);
}
let view = this.config.view;
if (view === GitExplorerView.Auto) {
view = Container.context.workspaceState.get<GitExplorerView>(WorkspaceState.GitExplorerView, GitExplorerView.Repository);
}
let view = this._view;
if (initializing) {
this._view = view;
setCommandContext(CommandContext.GitExplorerView, this._view);
if (initializing || configuration.changed(e, configuration.name('gitExplorer')('view').value)) {
view = this.config.view;
if (view === GitExplorerView.Auto) {
view = Container.context.workspaceState.get<GitExplorerView>(WorkspaceState.GitExplorerView, GitExplorerView.Repository);
}
this.setRoot(await this.getRootNode(window.activeTextEditor));
if (initializing) {
this._view = view;
setCommandContext(CommandContext.GitExplorerView, this._view);
this._disposable = window.registerTreeDataProvider('gitlens.gitExplorer', this);
}
else {
this.reset(view);
this.setRoot(await this.getRootNode(window.activeTextEditor));
this._disposable = window.registerTreeDataProvider('gitlens.gitExplorer', this);
return;
}
}
this.reset(view!);
}
private onRepositoriesChanged() {

+ 1
- 0
src/views/resultsExplorer.ts 파일 보기

@ -54,6 +54,7 @@ export class ResultsExplorer extends Disposable implements TreeDataProvider
if (!initializing &&
!configuration.changed(e, configuration.name('resultsExplorer').value) &&
!configuration.changed(e, configuration.name('explorers').value) &&
!configuration.changed(e, configuration.name('defaultGravatarsStyle').value)) return;
if (!initializing && this._roots.length !== 0) {

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