disable sleep inhibitor when lock-before-suspend disabled (#512)

This commit is contained in:
bokicoder authored and GitHub committed 2025-10-20 13:03:27 -04:00
1 parent 6ac382a25f
commit 9a305355c2
1 file changed
+2 -1
+2 -1
View File
@@ -339,6 +339,7 @@ Singleton {
if (SettingsData.loginctlLockIntegration) {
syncLockBeforeSuspend()
}
syncSleepInhibitor()
}
}
@@ -407,7 +408,7 @@ Singleton {
if (!DMSService.apiVersion || DMSService.apiVersion < 4) return
DMSService.sendRequest("loginctl.setSleepInhibitorEnabled", {
enabled: SettingsData.loginctlLockIntegration
enabled: SettingsData.loginctlLockIntegration && SettingsData.lockBeforeSuspend
}, response => {
if (response.error) {
console.warn("SessionService: Failed to sync sleep inhibitor:", response.error)