File tree Expand file tree Collapse file tree
src/vs/workbench/parts/git/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -410,7 +410,6 @@ export class GitService extends EventEmitter
410410 private reactiveStatusDelayer : PeriodThrottledDelayer < IModel > ;
411411 private autoFetcher : AutoFetcher ;
412412 private isStatusPending = false ;
413- private isFocused = true ;
414413
415414 private _allowHugeRepositories : boolean ;
416415 get allowHugeRepositories ( ) : boolean { return this . _allowHugeRepositories ; }
@@ -518,15 +517,10 @@ export class GitService extends EventEmitter
518517
519518 const focusEvent = domEvent ( window , 'focus' ) ;
520519 this . toDispose . push ( focusEvent ( ( ) => {
521- this . isFocused = true ;
522-
523520 if ( this . isStatusPending ) {
524521 this . triggerAutoStatus ( ) ;
525522 }
526523 } ) ) ;
527-
528- const blurEvent = domEvent ( window , 'blur' ) ;
529- this . toDispose . push ( blurEvent ( ( ) => this . isFocused = false ) ) ;
530524 }
531525
532526 private onTextFileChange ( e : TextFileModelChangeEvent ) : void {
@@ -615,7 +609,7 @@ export class GitService extends EventEmitter
615609 private triggerAutoStatus ( force = false ) : void {
616610 this . isStatusPending = true ;
617611
618- if ( ! this . isFocused && ! force ) {
612+ if ( ! document . hasFocus ( ) && ! force ) {
619613 return ;
620614 }
621615
You can’t perform that action at this time.
0 commit comments