mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
disable sleep inhibitor when lock-before-suspend disabled (#512)
This commit is contained in:
@@ -339,6 +339,7 @@ Singleton {
|
|||||||
if (SettingsData.loginctlLockIntegration) {
|
if (SettingsData.loginctlLockIntegration) {
|
||||||
syncLockBeforeSuspend()
|
syncLockBeforeSuspend()
|
||||||
}
|
}
|
||||||
|
syncSleepInhibitor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -407,7 +408,7 @@ Singleton {
|
|||||||
if (!DMSService.apiVersion || DMSService.apiVersion < 4) return
|
if (!DMSService.apiVersion || DMSService.apiVersion < 4) return
|
||||||
|
|
||||||
DMSService.sendRequest("loginctl.setSleepInhibitorEnabled", {
|
DMSService.sendRequest("loginctl.setSleepInhibitorEnabled", {
|
||||||
enabled: SettingsData.loginctlLockIntegration
|
enabled: SettingsData.loginctlLockIntegration && SettingsData.lockBeforeSuspend
|
||||||
}, response => {
|
}, response => {
|
||||||
if (response.error) {
|
if (response.error) {
|
||||||
console.warn("SessionService: Failed to sync sleep inhibitor:", response.error)
|
console.warn("SessionService: Failed to sync sleep inhibitor:", response.error)
|
||||||
|
|||||||
Reference in New Issue
Block a user