File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed
Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -623,6 +623,18 @@ export class ReviewManager extends Disposable {
623623 }
624624 }
625625
626+ private _openFirstDiff ( ) {
627+ if ( this . _reviewModel . localFileChanges . length ) {
628+ this . openDiff ( ) ;
629+ } else {
630+ const localFileChangesDisposable = this . _reviewModel . onDidChangeLocalFileChanges ( ( ) => {
631+ localFileChangesDisposable . dispose ( ) ;
632+ this . openDiff ( ) ;
633+ } ) ;
634+ }
635+ }
636+
637+
626638 private _doFocusShow ( pr : PullRequestModel , updateLayout : boolean ) {
627639 // Respect the setting 'comments.openView' when it's 'never'.
628640 const shouldShowCommentsView = vscode . workspace . getConfiguration ( COMMENTS ) . get < 'never' | string > ( OPEN_VIEW ) ;
@@ -638,18 +650,15 @@ export class ReviewManager extends Disposable {
638650 }
639651
640652 if ( focusedMode === 'firstDiff' ) {
641- if ( this . _reviewModel . localFileChanges . length ) {
642- this . openDiff ( ) ;
643- } else {
644- const localFileChangesDisposable = this . _reviewModel . onDidChangeLocalFileChanges ( ( ) => {
645- localFileChangesDisposable . dispose ( ) ;
646- this . openDiff ( ) ;
647- } ) ;
648- }
653+ return this . _openFirstDiff ( ) ;
649654 } else if ( focusedMode === 'overview' ) {
650655 return this . openDescription ( ) ;
651656 } else if ( focusedMode === 'multiDiff' ) {
652- return PullRequestModel . openChanges ( this . _folderRepoManager , pr ) ;
657+ if ( pr . fileChanges . size < 400 ) {
658+ return PullRequestModel . openChanges ( this . _folderRepoManager , pr ) ;
659+ } else {
660+ return this . _openFirstDiff ( ) ;
661+ }
653662 }
654663 }
655664 }
You can’t perform that action at this time.
0 commit comments