mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
disable sleep inhibitor when lock-before-suspend disabled (#512)
This commit is contained in:
@@ -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