1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-30 09:32:05 -04:00

loginctl: simplify event handling

This commit is contained in:
bbedward
2026-04-22 10:32:05 -04:00
parent b87c36d29e
commit 97fa86d8f0
8 changed files with 18 additions and 129 deletions

View File

@@ -341,18 +341,6 @@ Singleton {
Connections {
target: DMSService
enabled: typeof DMSService !== "undefined" && typeof SessionData !== "undefined"
function onLoginctlEvent(event) {
if (!SessionData.themeModeAutoEnabled)
return;
if (typeof SettingsData !== "undefined" && SettingsData.loginctlLockIntegration)
return;
const eventType = String(event?.type || event?.event || "").toLowerCase();
if (eventType === "unlock") {
root.triggerThemeAutomationRefresh();
}
}
function onThemeAutoStateUpdate(data) {
if (!SessionData.themeModeAutoEnabled) {
@@ -415,7 +403,7 @@ Singleton {
Connections {
target: SessionService
enabled: typeof SessionService !== "undefined" && typeof SessionData !== "undefined" && SessionData.themeModeAutoEnabled
enabled: SessionData.themeModeAutoEnabled
function onSessionUnlocked() {
root.triggerThemeAutomationRefresh();