fix(notification-server):修复应用关闭通知接口失效的问题
This commit is contained in:
parent
f16d0f8b3c
commit
d39105a758
|
@ -112,14 +112,11 @@ QString ServerPrivate::GetServerInformation(QString &vendor, QString &version, Q
|
||||||
|
|
||||||
void ServerPrivate::CloseNotification(uint id)
|
void ServerPrivate::CloseNotification(uint id)
|
||||||
{
|
{
|
||||||
for(const QString &service : m_notificationWatchers->watchedServices()) {
|
if(m_notificationsCache.contains(id)) {
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(service,
|
m_notificationsCache.remove(id);
|
||||||
QStringLiteral("/NotificationClient"),
|
|
||||||
QStringLiteral("org.ukui.NotificationClient"),
|
|
||||||
QStringLiteral("CloseNotification"));
|
|
||||||
msg.setArguments({id, UkuiNotification::NotificationCloseReason::Revoked});
|
|
||||||
QDBusConnection::sessionBus().call(msg, QDBus::NoBlock);
|
|
||||||
}
|
}
|
||||||
|
qDebug() << "CloseNotification(Revoked)" << id;
|
||||||
|
Q_EMIT NotificationClosed(id, UkuiNotification::NotificationCloseReason::Revoked);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ServerPrivate::init()
|
bool ServerPrivate::init()
|
||||||
|
|
Loading…
Reference in New Issue