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 {
623
623
}
624
624
}
625
625
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
+
626
638
private _doFocusShow ( pr : PullRequestModel , updateLayout : boolean ) {
627
639
// Respect the setting 'comments.openView' when it's 'never'.
628
640
const shouldShowCommentsView = vscode . workspace . getConfiguration ( COMMENTS ) . get < 'never' | string > ( OPEN_VIEW ) ;
@@ -638,18 +650,15 @@ export class ReviewManager extends Disposable {
638
650
}
639
651
640
652
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 ( ) ;
649
654
} else if ( focusedMode === 'overview' ) {
650
655
return this . openDescription ( ) ;
651
656
} 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
+ }
653
662
}
654
663
}
655
664
}
You can’t perform that action at this time.
0 commit comments