Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[commhistoryd] Use low urgency on notifications without popup. Contri…
…butes to JB#51797

Should have the same end result as the clearing but allows to reconsider
that api.
  • Loading branch information
pvuorela committed Oct 29, 2020
1 parent 7eadf8b commit 21e0d21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/notificationmanager.cpp
Expand Up @@ -303,10 +303,9 @@ void NotificationManager::showNotification(const CommHistory::Event& event,
amendCallNotification(personal, event, text);

if (event.type() == CommHistory::Event::CallEvent) {
// avoid popup
Notification *notification = personal->notification();

notification->clearPreviewSummary();
notification->clearPreviewBody();
notification->setUrgency(Notification::Low);
}

personal->publishNotification();
Expand Down
4 changes: 2 additions & 2 deletions src/personalnotification.cpp
Expand Up @@ -170,8 +170,8 @@ void PersonalNotification::publishNotification()
NotificationManager::instance()->setNotificationProperties(m_notification, this, false);

if (collection() == Voice) {
m_notification->clearPreviewSummary();
m_notification->clearPreviewBody();
// avoid popup
m_notification->setUrgency(Notification::Low);
}

m_notification->publish();
Expand Down

0 comments on commit 21e0d21

Please sign in to comment.