Skip to content

Commit

Permalink
Don't check active as it's buggy
Browse files Browse the repository at this point in the history
  • Loading branch information
mustard-mh committed Jul 10, 2024
1 parent bfbce28 commit 92194de
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/heartbeat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ export class HeartbeatManager extends Disposable {
this._register(vscode.window.onDidCloseTerminal(() => this.updateLastActivity('onDidCloseTerminal')));
this._register(vscode.window.onDidChangeTerminalState(() => this.updateLastActivity('onDidChangeTerminalState')));
this._register(vscode.window.onDidChangeWindowState((e) => {
// active property was introduced in 1.89, but not exist in 1.75
// https://code.visualstudio.com/api/references/vscode-api#WindowState
const isActive: Boolean | undefined = (e as any).active;
if (isActive === true || e.focused !== this.focused) {
if (e.focused !== this.focused) {
this.focused = e.focused;
this.updateLastActivity('onDidChangeWindowState');
}
Expand Down

0 comments on commit 92194de

Please sign in to comment.