소스 검색

Defers preference loading until needed

main
Eric Amodio 2 년 전
부모
커밋
902527b29c
1개의 변경된 파일10개의 추가작업 그리고 4개의 파일을 삭제
  1. +10
    -4
      src/webviews/commitDetails/commitDetailsWebviewView.ts

+ 10
- 4
src/webviews/commitDetails/commitDetailsWebviewView.ts 파일 보기

@ -90,10 +90,7 @@ export class CommitDetailsWebviewView extends WebviewViewBase
this._context = {
pinned: false,
commit: undefined,
preferences: {
autolinksExpanded: this.container.storage.getWorkspace('views:commitDetails:autolinksExpanded'),
filesAsTree: this.container.storage.getWorkspace('views:commitDetails:filesAsTree'),
},
preferences: undefined,
richStateLoaded: false,
formattedMessage: undefined,
autolinkedIssues: undefined,
@ -150,6 +147,15 @@ export class CommitDetailsWebviewView extends WebviewViewBase
}
protected override onInitializing(): Disposable[] | undefined {
if (this._context.preferences == null) {
this.updatePendingContext({
preferences: {
autolinksExpanded: this.container.storage.getWorkspace('views:commitDetails:autolinksExpanded'),
filesAsTree: this.container.storage.getWorkspace('views:commitDetails:filesAsTree'),
},
});
}
if (this._context.commit == null) {
const commit = this.getBestCommitOrStash();
if (commit != null) {

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