diff --git a/notification-server/server.cpp b/notification-server/server.cpp index 5528237..43d3dc6 100644 --- a/notification-server/server.cpp +++ b/notification-server/server.cpp @@ -112,14 +112,11 @@ QString ServerPrivate::GetServerInformation(QString &vendor, QString &version, Q void ServerPrivate::CloseNotification(uint id) { - for(const QString &service : m_notificationWatchers->watchedServices()) { - QDBusMessage msg = QDBusMessage::createMethodCall(service, - QStringLiteral("/NotificationClient"), - QStringLiteral("org.ukui.NotificationClient"), - QStringLiteral("CloseNotification")); - msg.setArguments({id, UkuiNotification::NotificationCloseReason::Revoked}); - QDBusConnection::sessionBus().call(msg, QDBus::NoBlock); + if(m_notificationsCache.contains(id)) { + m_notificationsCache.remove(id); } + qDebug() << "CloseNotification(Revoked)" << id; + Q_EMIT NotificationClosed(id, UkuiNotification::NotificationCloseReason::Revoked); } bool ServerPrivate::init()