Skip to content

Commit

Permalink
Fix idle detection running even when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderfrangos committed Jul 8, 2022
1 parent 80026bf commit 195a9cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
Expand Down

0 comments on commit 195a9cc

Please sign in to comment.