Consider notification as closed when action invoked
This commit is contained in:
parent
e5481f5f43
commit
e31c2df570
|
@ -226,7 +226,11 @@ void DBusNotification::handleActionInvoked(uint id, const QString &action)
|
|||
{
|
||||
auto i = pendingNotifications.find(id);
|
||||
if(i != pendingNotifications.end()) {
|
||||
emit i->second->actionInvoked(action);
|
||||
DBusNotification *notification = i->second;
|
||||
notification->m_id = 0;
|
||||
emit notification->actionInvoked(action);
|
||||
emit notification->closed(NotificationCloseReason::ActionInvoked);
|
||||
pendingNotifications.erase(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,8 @@ enum class NotificationCloseReason
|
|||
Undefined,
|
||||
Expired,
|
||||
Dismissed,
|
||||
Manually
|
||||
Manually,
|
||||
ActionInvoked
|
||||
};
|
||||
|
||||
class QT_UTILITIES_EXPORT DBusNotification : public QObject
|
||||
|
|
Loading…
Reference in New Issue