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.
This commit is contained in:
parent
81daf6649e
commit
8d521540a8
1 changed files with 1 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue