1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-26 21:23:34 +00:00

Fix electron 11 support (#708)

This commit is contained in:
proletarius101
2021-02-04 01:47:44 +08:00
committed by GitHub
parent b93792332e
commit 6dc81a6e01
3 changed files with 5 additions and 9 deletions

View File

@@ -7,7 +7,6 @@ import { isSnapStore } from 'jslib/electron/utils';
import { Main } from '../main';
// tslint:disable-next-line
const desktopIdle = require('desktop-idle');
const IdleLockSeconds = 5 * 60; // 5 minutes
const IdleCheckInterval = 30 * 1000; // 30 seconds
@@ -42,7 +41,7 @@ export class PowerMonitorMain {
// System idle
global.setInterval(async () => {
const idleSeconds: number = desktopIdle.getIdleTime();
const idleSeconds: number = powerMonitor.getSystemIdleTime();
const idle = idleSeconds >= IdleLockSeconds;
if (idle) {
if (this.idle) {