From 3cf3c54222852202ddb874acbfd6710e3973f22c Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Tue, 10 Sep 2013 15:04:08 +0200 Subject: [PATCH] Fixed a bug that caused notification spam when a notification was updated BUG: 324744 --- kded/plugins/notifications/notificationsdbusinterface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kded/plugins/notifications/notificationsdbusinterface.cpp b/kded/plugins/notifications/notificationsdbusinterface.cpp index 3b9eabde4..24466a403 100644 --- a/kded/plugins/notifications/notificationsdbusinterface.cpp +++ b/kded/plugins/notifications/notificationsdbusinterface.cpp @@ -50,9 +50,9 @@ void NotificationsDbusInterface::processPackage(const NetworkPackage& np) removeNotification(np.get("id")); } else { Notification* noti = new Notification(np, this); - addNotification(noti); - if (!np.get("requestAnswer", false)) { //Do not show notifications for answers to a initial request + //Do not show updates to existent notification nor answers to a initialization request + if (!mInternalIdToPublicId.contains(noti->internalId()) && !np.get("requestAnswer", false)) { KNotification* notification = new KNotification("notification"); notification->setPixmap(KIcon("preferences-desktop-notification").pixmap(48, 48)); notification->setComponentData(KComponentData("kdeconnect", "kdeconnect")); @@ -61,7 +61,7 @@ void NotificationsDbusInterface::processPackage(const NetworkPackage& np) notification->sendEvent(); } - + addNotification(noti); } }