Browse Source

Merge f9d27ef2a7 into 930cb9ab96

pull/16744/merge
Bernd Schoolmann 3 hours ago committed by GitHub
parent
commit
abaea1c7fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 12
      apps/desktop/src/main/power-monitor.main.ts

12
apps/desktop/src/main/power-monitor.main.ts

@ -4,8 +4,6 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service" @@ -4,8 +4,6 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
import { MessageSender } from "@bitwarden/common/platform/messaging";
import { powermonitors } from "@bitwarden/desktop-napi";
import { isSnapStore } from "../utils";
// tslint:disable-next-line
const IdleLockSeconds = 5 * 60; // 5 minutes
const IdleCheckInterval = 30 * 1000; // 30 seconds
@ -19,13 +17,9 @@ export class PowerMonitorMain { @@ -19,13 +17,9 @@ export class PowerMonitorMain {
) {}
init() {
// ref: https://github.com/electron/electron/issues/13767
if (!isSnapStore()) {
// System sleep
powerMonitor.on("suspend", () => {
this.messagingService.send("systemSuspended");
});
}
powerMonitor.on("suspend", () => {
this.messagingService.send("systemSuspended");
});
if (process.platform !== "linux") {
// System locked

Loading…
Cancel
Save