Commit 5c83d292 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[Notifications] Don't replace last one if next one is identical

Since there is timeout for when it is considered a separate notification and we don't even close the previous one properly.
Just remove that stopgap and if we need something like this again, do it properly.

Differential Revision: https://phabricator.kde.org/D21473
parent a24166f7
......@@ -83,19 +83,6 @@ NotificationsModel::Private::~Private()
void NotificationsModel::Private::onNotificationAdded(const Notification &notification)
{
// If we get the same notification in succession, just compress them into one
if (!notifications.isEmpty()) {
const Notification &lastNotification = notifications.constLast();
if (lastNotification.applicationName() == notification.applicationName()
&& lastNotification.summary() == notification.summary()
&& lastNotification.body() == notification.body()
&& lastNotification.desktopEntry() == notification.desktopEntry()
&& lastNotification.applicationName() == notification.applicationName()) {
onNotificationReplaced(lastNotification.id(), notification);
return;
}
}
// Once we reach a certain insane number of notifications discard some old ones
// as we keep pixmaps around etc
if (notifications.count() >= s_notificationsLimit) {
......
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