1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-03 18:23:57 +00:00

Re-enable lock on sleep on snap

This commit is contained in:
Bernd Schoolmann
2025-10-06 13:35:46 +02:00
parent 727689d827
commit d218c3d20f

View File

@@ -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 {
) {}
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