[Notification Data Engine] Don't group notification if it should replace an existing one

If an application explicitly requests a notification to replace another one (replaces_id set),
don't group it with another notification.

When creating a KNotification object and then updating it by calling e.g. setText it would
just append it to the already shown notification.

Differential Revision: https://phabricator.kde.org/D2954
wilder-5.14
Kai Uwe Broulik 10 years ago
parent 4e5d70d8b5
commit fcc806c098
  1. 3
      dataengines/notifications/notificationsengine.cpp

@ -193,10 +193,9 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
// group notifications that have the same title coming from the same app
// or if they are on the "blacklist", honor the skipGrouping hint sent
if (m_activeNotifications.values().contains(app_name + summary) && !skipGrouping && !m_alwaysReplaceAppsList.contains(app_name)) {
if (!replaces_id && m_activeNotifications.values().contains(app_name + summary) && !skipGrouping && !m_alwaysReplaceAppsList.contains(app_name)) {
// cut off the "notification " from the source name
partOf = m_activeNotifications.key(app_name + summary).midRef(13).toUInt();
}
qDebug() << "Currrent active notifications:" << m_activeNotifications;

Loading…
Cancel
Save