Moved NotificationHistoryPanel in shell.qml

This commit is contained in:
quadbyte 2025-08-13 09:40:44 -04:00
parent 207310cd24
commit 01dd64dbcc
2 changed files with 12 additions and 12 deletions

View file

@ -15,25 +15,21 @@ NIconButton {
icon: "notifications" icon: "notifications"
tooltipText: "Notification History" tooltipText: "Notification History"
onClicked: { onClicked: {
if (!notificationHistoryPanelLoader.active) { if (!notificationHistoryPanel.active) {
notificationHistoryPanelLoader.isLoaded = true notificationHistoryPanel.isLoaded = true
} }
if (notificationHistoryPanelLoader.item) { if (notificationHistoryPanel.item) {
if (notificationHistoryPanelLoader.item.visible) { if (notificationHistoryPanel.item.visible) {
// Panel is visible, hide it with animation // Panel is visible, hide it with animation
if (notificationHistoryPanelLoader.item.hide) { if (notificationHistoryPanel.item.hide) {
notificationHistoryPanelLoader.item.hide() notificationHistoryPanel.item.hide()
} else { } else {
notificationHistoryPanelLoader.item.visible = false notificationHistoryPanel.item.visible = false
} }
} else { } else {
// Panel is hidden, show it // Panel is hidden, show it
notificationHistoryPanelLoader.item.visible = true notificationHistoryPanel.item.visible = true
} }
} }
} }
NotificationHistoryPanel {
id: notificationHistoryPanelLoader
}
} }

View file

@ -43,6 +43,10 @@ ShellRoot {
id: notification id: notification
} }
NotificationHistoryPanel {
id: notificationHistoryPanel
}
Component.onCompleted: { Component.onCompleted: {
// Ensure our singleton is created as soon as possible so we start fetching weather asap // Ensure our singleton is created as soon as possible so we start fetching weather asap
Location.init() Location.init()