Consider notification as closed when action invoked

This commit is contained in:
Martchus 2016-12-11 18:05:01 +01:00
parent e5481f5f43
commit e31c2df570
2 changed files with 7 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -25,7 +25,8 @@ enum class NotificationCloseReason
Undefined,
Expired,
Dismissed,
Manually
Manually,
ActionInvoked
};
class QT_UTILITIES_EXPORT DBusNotification : public QObject