From 8d521540a87333906a51175c07756ca98b573e54 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Wed, 17 Mar 2021 23:42:50 +0100 Subject: [PATCH] Mark notifications as resident This means that they are not deleted automatically on timeout and thus can be interacted with from Plasma's history. The KNotification is parented to the Notification so it gets deleted when the notification is dismissed from the phone or the Plasmoid. --- plugins/notifications/notification.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/notifications/notification.cpp b/plugins/notifications/notification.cpp index 86bc6e0e5..4ba6d6847 100644 --- a/plugins/notifications/notification.cpp +++ b/plugins/notifications/notification.cpp @@ -92,6 +92,7 @@ void Notification::createKNotification(const NetworkPacket& np) if (!m_notification) { m_notification = new KNotification(QStringLiteral("notification"), KNotification::CloseOnTimeout, this); m_notification->setComponentName(QStringLiteral("kdeconnect")); + m_notification->setHint(QStringLiteral("resident"), true); // This means the notification won't be deleted automatically, but only with KNotifications 5.81 } QString escapedTitle = m_title.toHtmlEscaped();