mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-01 19:18:28 -04:00
polkit: fix DMS_DISABLE_POLKIT regression from qs 0.2 deprecation commit
fixes #2897 port 1.5
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
import Quickshell.Services.Polkit
|
||||
|
||||
PolkitAgent {}
|
||||
@@ -3,7 +3,6 @@ pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Services.Polkit
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
@@ -12,10 +11,13 @@ Singleton {
|
||||
readonly property bool disablePolkitIntegration: Quickshell.env("DMS_DISABLE_POLKIT") === "1"
|
||||
|
||||
readonly property bool polkitAvailable: !disablePolkitIntegration
|
||||
readonly property alias agent: polkitAgentInstance
|
||||
readonly property var agent: polkitAgentLoader.item
|
||||
|
||||
PolkitAgent {
|
||||
id: polkitAgentInstance
|
||||
Loader {
|
||||
id: polkitAgentLoader
|
||||
active: root.polkitAvailable
|
||||
asynchronous: false
|
||||
source: "PolkitAgentInstance.qml"
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
|
||||
Reference in New Issue
Block a user