From aa3a6044a23612dbd48a547efda82f661569bbcf Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Thu, 28 May 2020 15:21:21 -0500 Subject: [PATCH] [Bug] Update lock to be default timeout action (#459) * Update jslib 2de8c5e -> 212a2e3 * Updated conditionals to make lock the default state --- jslib | 2 +- src/main/powerMonitor.main.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/jslib b/jslib index 2858724f44..212a2e3745 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 2858724f4431038be190fc0b748efe287dd1bae6 +Subproject commit 212a2e3745e6e0e2b3057ed308c47daf6aeefbc8 diff --git a/src/main/powerMonitor.main.ts b/src/main/powerMonitor.main.ts index 32ad1972da..7c4e130f89 100644 --- a/src/main/powerMonitor.main.ts +++ b/src/main/powerMonitor.main.ts @@ -23,8 +23,8 @@ export class PowerMonitorMain { powerMonitor.on('suspend', async () => { const options = await this.getVaultTimeoutOptions(); if (options[0] === -3) { - options[1] === 'lock' ? this.main.messagingService.send('lockVault') : - this.main.messagingService.send('logout', { expired: false }); + options[1] === 'logOut' ? this.main.messagingService.send('logout', { expired: false }) : + this.main.messagingService.send('lockVault'); } }); } @@ -34,8 +34,8 @@ export class PowerMonitorMain { powerMonitor.on('lock-screen', async () => { const options = await this.getVaultTimeoutOptions(); if (options[0] === -2) { - options[1] === 'lock' ? this.main.messagingService.send('lockVault') : - this.main.messagingService.send('logout', { expired: false }); + options[1] === 'logOut' ? this.main.messagingService.send('logout', { expired: false }) : + this.main.messagingService.send('lockVault'); } }); } @@ -51,8 +51,8 @@ export class PowerMonitorMain { const options = await this.getVaultTimeoutOptions(); if (options[0] === -4) { - options[1] === 'lock' ? this.main.messagingService.send('lockVault') : - this.main.messagingService.send('logout', { expired: false }); + options[1] === 'logOut' ? this.main.messagingService.send('logout', { expired: false }) : + this.main.messagingService.send('lockVault'); } }