From 00e6172a6888cd08781c2b321ded2d3c359dbf18 Mon Sep 17 00:00:00 2001 From: purian23 Date: Thu, 12 Feb 2026 22:50:11 -0500 Subject: [PATCH] Fix global warnings --- .../Center/KeyboardNavigatedNotificationList.qml | 8 ++++++-- .../Modules/Notifications/Center/NotificationCard.qml | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/quickshell/Modules/Notifications/Center/KeyboardNavigatedNotificationList.qml b/quickshell/Modules/Notifications/Center/KeyboardNavigatedNotificationList.qml index b4c0fac5..cd03f9c0 100644 --- a/quickshell/Modules/Notifications/Center/KeyboardNavigatedNotificationList.qml +++ b/quickshell/Modules/Notifications/Center/KeyboardNavigatedNotificationList.qml @@ -16,7 +16,8 @@ DankListView { Component.onCompleted: { Qt.callLater(() => { - listInitialized = true; + if (listView) + listView.listInitialized = true; }); } @@ -88,7 +89,8 @@ DankListView { Component.onCompleted: { Qt.callLater(() => { - __delegateInitialized = true; + if (delegateRoot) + delegateRoot.__delegateInitialized = true; }); } @@ -109,6 +111,8 @@ DankListView { listView.isAnimatingExpansion = true; } else { Qt.callLater(() => { + if (!notificationCard || !listView) + return; let anyAnimating = false; for (let i = 0; i < listView.count; i++) { const item = listView.itemAtIndex(i); diff --git a/quickshell/Modules/Notifications/Center/NotificationCard.qml b/quickshell/Modules/Notifications/Center/NotificationCard.qml index 48770aaf..ebe502f8 100644 --- a/quickshell/Modules/Notifications/Center/NotificationCard.qml +++ b/quickshell/Modules/Notifications/Center/NotificationCard.qml @@ -37,7 +37,8 @@ Rectangle { Component.onCompleted: { Qt.callLater(() => { - __initialized = true; + if (root) + root.__initialized = true; }); } @@ -341,6 +342,7 @@ Rectangle { model: notificationGroup?.notifications?.slice(0, 10) || [] delegate: Rectangle { + id: expandedDelegate required property var modelData required property int index readonly property bool messageExpanded: NotificationService.expandedMessages[modelData?.notification?.id] || false @@ -352,7 +354,8 @@ Rectangle { Component.onCompleted: { Qt.callLater(() => { - __delegateInitialized = true; + if (expandedDelegate) + expandedDelegate.__delegateInitialized = true; }); }