diff --git a/Modules/Bar/NotificationHistory.qml b/Modules/Bar/NotificationHistory.qml index 89aa863..d4c3b47 100644 --- a/Modules/Bar/NotificationHistory.qml +++ b/Modules/Bar/NotificationHistory.qml @@ -15,25 +15,21 @@ NIconButton { icon: "notifications" tooltipText: "Notification History" onClicked: { - if (!notificationHistoryPanelLoader.active) { - notificationHistoryPanelLoader.isLoaded = true + if (!notificationHistoryPanel.active) { + notificationHistoryPanel.isLoaded = true } - if (notificationHistoryPanelLoader.item) { - if (notificationHistoryPanelLoader.item.visible) { + if (notificationHistoryPanel.item) { + if (notificationHistoryPanel.item.visible) { // Panel is visible, hide it with animation - if (notificationHistoryPanelLoader.item.hide) { - notificationHistoryPanelLoader.item.hide() + if (notificationHistoryPanel.item.hide) { + notificationHistoryPanel.item.hide() } else { - notificationHistoryPanelLoader.item.visible = false + notificationHistoryPanel.item.visible = false } } else { // Panel is hidden, show it - notificationHistoryPanelLoader.item.visible = true + notificationHistoryPanel.item.visible = true } } } - - NotificationHistoryPanel { - id: notificationHistoryPanelLoader - } } diff --git a/shell.qml b/shell.qml index f1e589b..f5f4e3b 100644 --- a/shell.qml +++ b/shell.qml @@ -43,6 +43,10 @@ ShellRoot { id: notification } + NotificationHistoryPanel { + id: notificationHistoryPanel + } + Component.onCompleted: { // Ensure our singleton is created as soon as possible so we start fetching weather asap Location.init()