Commit 0c54b26d authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Let settings query for badge blacklist

Needed for Task Manager settings.
Also remove an assert that is often hit because it was wrong
parent 86260aba
......@@ -124,7 +124,6 @@ void NotificationsModel::Private::onNotificationReplaced(uint replacedId, const
return;
}
Q_ASSERT(notifications[row].id() == notification.id());
setupNotificationTimeout(notification);
notifications[row] = notification;
......
......@@ -505,6 +505,11 @@ QStringList Settings::historyBlacklistedServices() const
return d->behaviorMatchesList(d->servicesGroup(), ShowInHistory, false);
}
QStringList Settings::badgeBlacklistedApplications() const
{
return d->behaviorMatchesList(d->applicationsGroup(), ShowBadges, false);
}
QDateTime Settings::notificationsInhibitedUntil() const
{
return DoNotDisturbSettings::until();
......
......@@ -131,6 +131,11 @@ class NOTIFICATIONMANAGER_EXPORT Settings : public QObject
*/
Q_PROPERTY(QStringList historyBlacklistedServices READ historyBlacklistedServices NOTIFY settingsChanged)
/**
* A list of desktop entries of applications which shouldn't show badges in task manager.
*/
Q_PROPERTY(QStringList badgeBlacklistedApplications READ badgeBlacklistedApplications NOTIFY settingsChanged)
/**
* The date until which do not disturb mode is enabled.
*
......@@ -284,6 +289,8 @@ public:
QStringList historyBlacklistedApplications() const;
QStringList historyBlacklistedServices() const;
QStringList badgeBlacklistedApplications() const;
QDateTime notificationsInhibitedUntil() const;
void setNotificationsInhibitedUntil(const QDateTime &time);
void resetNotificationsInhibitedUntil();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment