Fixed a bug that caused notification spam when a notification was updated
BUG: 324744
This commit is contained in:
parent
b22dee3e7e
commit
3cf3c54222
1 changed files with 3 additions and 3 deletions
|
@ -50,9 +50,9 @@ void NotificationsDbusInterface::processPackage(const NetworkPackage& np)
|
||||||
removeNotification(np.get<QString>("id"));
|
removeNotification(np.get<QString>("id"));
|
||||||
} else {
|
} else {
|
||||||
Notification* noti = new Notification(np, this);
|
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");
|
KNotification* notification = new KNotification("notification");
|
||||||
notification->setPixmap(KIcon("preferences-desktop-notification").pixmap(48, 48));
|
notification->setPixmap(KIcon("preferences-desktop-notification").pixmap(48, 48));
|
||||||
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
|
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
|
||||||
|
@ -61,7 +61,7 @@ void NotificationsDbusInterface::processPackage(const NetworkPackage& np)
|
||||||
notification->sendEvent();
|
notification->sendEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addNotification(noti);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue