Commit b59ef618 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[notifications] Set actions before sending the notification

parent 1ed998a9
Pipeline #18844 failed with stage
in 3 minutes and 14 seconds
......@@ -132,6 +132,13 @@ void Notification::createKNotification(const NetworkPacket& np)
m_notification->setHint(QStringLiteral("x-kde-origin-name"), m_device->name());
#endif
if (!m_requestReplyId.isEmpty()) {
m_actions.prepend(i18n("Reply"));
connect(m_notification, &KNotification::action1Activated, this, &Notification::reply, Qt::UniqueConnection);
}
m_notification->setActions(m_actions);
m_hasIcon = m_hasIcon && !m_payloadHash.isEmpty();
if (!m_hasIcon) {
......@@ -140,13 +147,6 @@ void Notification::createKNotification(const NetworkPacket& np)
m_iconPath = m_imagesDir.absoluteFilePath(m_payloadHash);
loadIcon(np);
}
if (!m_requestReplyId.isEmpty()) {
m_actions.prepend(i18n("Reply"));
connect(m_notification, &KNotification::action1Activated, this, &Notification::reply, Qt::UniqueConnection);
}
m_notification->setActions(m_actions);
}
void Notification::loadIcon(const NetworkPacket& np)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment