Skip to content

Commit 4a15897

Browse files
committed
1 parent f178d6c commit 4a15897

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/vs/workbench/parts/git/browser/gitServices.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)