mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-30 17:42:06 -04:00
loginctl: simplify event handling
This commit is contained in:
@@ -472,7 +472,6 @@ Singleton {
|
||||
}
|
||||
|
||||
function onCapabilitiesReceived() {
|
||||
checkDMSCapabilities();
|
||||
syncSleepInhibitor();
|
||||
}
|
||||
}
|
||||
@@ -526,10 +525,6 @@ Singleton {
|
||||
function onLoginctlStateUpdate(data) {
|
||||
updateLoginctlState(data);
|
||||
}
|
||||
|
||||
function onLoginctlEvent(event) {
|
||||
handleLoginctlEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
function checkDMSCapabilities() {
|
||||
@@ -677,16 +672,4 @@ Singleton {
|
||||
|
||||
loginctlStateChanged();
|
||||
}
|
||||
|
||||
function handleLoginctlEvent(event) {
|
||||
if (event.event === "Lock") {
|
||||
locked = true;
|
||||
lockedHint = true;
|
||||
sessionLocked();
|
||||
} else if (event.event === "Unlock") {
|
||||
locked = false;
|
||||
lockedHint = false;
|
||||
sessionUnlocked();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user