This commit is contained in:
Joao Moreno
2016-10-27 12:00:14 +02:00
parent f178d6c30f
commit 4a15897b3f
@@ -410,7 +410,6 @@ export class GitService extends EventEmitter
private reactiveStatusDelayer: PeriodThrottledDelayer<IModel>;
private autoFetcher: AutoFetcher;
private isStatusPending = false;
private isFocused = true;
private _allowHugeRepositories: boolean;
get allowHugeRepositories(): boolean { return this._allowHugeRepositories; }
@@ -518,15 +517,10 @@ export class GitService extends EventEmitter
const focusEvent = domEvent(window, 'focus');
this.toDispose.push(focusEvent(() => {
this.isFocused = true;
if (this.isStatusPending) {
this.triggerAutoStatus();
}
}));
const blurEvent = domEvent(window, 'blur');
this.toDispose.push(blurEvent(() => this.isFocused = false));
}
private onTextFileChange(e: TextFileModelChangeEvent): void {
@@ -615,7 +609,7 @@ export class GitService extends EventEmitter
private triggerAutoStatus(force = false): void {
this.isStatusPending = true;
if (!this.isFocused && !force) {
if (!document.hasFocus() && !force) {
return;
}