1
0
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:
bokicoder
2025-10-21 01:03:27 +08:00
committed by GitHub
parent 6ac382a25f
commit 9a305355c2

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)