Commit 5837fa15 authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Fixed a bug that caused notification spam when a notification was updated

BUG: 324744
parent 6a1c01bf
......@@ -50,9 +50,9 @@ void NotificationsDbusInterface::processPackage(const NetworkPackage& np)
removeNotification(np.get<QString>("id"));
} else {
Notification* noti = new Notification(np, this);
addNotification(noti);
if (!np.get<bool>("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<bool>("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);
}
}
......
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