From 195a9ccbdeaa00c91c7768734dfe29ad0a720740 Mon Sep 17 00:00:00 2001 From: Xander Frangos <33106561+xanderfrangos@users.noreply.github.com> Date: Fri, 8 Jul 2022 09:46:41 -0400 Subject: [PATCH] Fix idle detection running even when disabled --- src/electron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/electron.js b/src/electron.js index 579860f0..731b4c72 100644 --- a/src/electron.js +++ b/src/electron.js @@ -2701,7 +2701,7 @@ function idleCheckLong() { if(powerMonitor.onBatteryPower) return false; const idleTime = powerMonitor.getSystemIdleTime() lastIdleTime = idleTime - if(idleTime > (settings.detectIdleTime ? settings.detectIdleTime : 180) && !notIdleMonitor) { + if(idleTime > (settings.detectIdleTime * 1 > 0 ? settings.detectIdleTime : 180) && !notIdleMonitor) { startIdleCheckShort() } }