- if (_notifications.count()) {
- if (QtUi::mainWindow()->systemTray()->mode() == SystemTray::Legacy)
- _blockActivation = true; // prevent double activation because both tray icon and bubble might send a signal
- if (!notificationId)
- notificationId = _notifications.count() ? _notifications.last().notificationId : 0;
- emit activated(notificationId);
+ QList<Notification>::iterator i = _notifications.begin();
+ while (i != _notifications.end()) {
+ if (i->notificationId == notificationId) {
+ if (QtUi::mainWindow()->systemTray()->mode() == SystemTray::Legacy)
+ _blockActivation = true; // prevent double activation because both tray icon and bubble might send a signal
+ emit activated(notificationId);
+ break;
+ }
+ ++i;