mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-12 11:39:57 +01:00
fixes #11918
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user