diff --git a/shell/plugins/bar/indicators/Dnd.qml b/shell/plugins/bar/indicators/Dnd.qml index fe6971ca..89b0319b 100644 --- a/shell/plugins/bar/indicators/Dnd.qml +++ b/shell/plugins/bar/indicators/Dnd.qml @@ -5,7 +5,9 @@ import qs.Ui BarIndicator { id: root - readonly property var notificationService: bar.shell.firstPartyServiceFor("omarchy.notifications") + readonly property var notificationService: bar && bar.shell && typeof bar.shell.firstPartyServiceFor === "function" + ? bar.shell.firstPartyServiceFor("omarchy.notifications") + : null readonly property bool dnd: notificationService ? notificationService.doNotDisturb : false active: dnd diff --git a/shell/plugins/bar/widgets/Indicators.qml b/shell/plugins/bar/widgets/Indicators.qml index 644f2833..3e761d52 100644 --- a/shell/plugins/bar/widgets/Indicators.qml +++ b/shell/plugins/bar/widgets/Indicators.qml @@ -403,6 +403,7 @@ BarWidget { property bool activeStateObserved: false readonly property string indicatorId: root.entryId(entry) readonly property var indicatorSettings: root.entrySettings(entry) + readonly property var barRef: root.bar implicitWidth: indicatorSource.item && indicatorSource.item.visible ? indicatorSource.item.implicitWidth : 0 implicitHeight: indicatorSource.item && indicatorSource.item.visible ? indicatorSource.item.implicitHeight : 0 @@ -415,8 +416,12 @@ BarWidget { } onIndicatorBlockChanged: injectProps() onIndicatorSettingsChanged: injectProps() - onIndicatorsModuleChanged: syncActiveState() + onIndicatorsModuleChanged: { + injectProps() + syncActiveState() + } onReportActiveStateChanged: syncActiveState() + onBarRefChanged: injectProps() Loader { id: indicatorSource