mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-28 22:17:48 -04:00
disable sleep inhibitor when lock-before-suspend disabled (#512)
This commit is contained in:
1 parent
6ac382a25f
commit
9a305355c2
1 file changed
+2
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user