messageTray: Do not show low priority notifications

Low priority notifications are meant for information that doesn't require
immediate attention, so it makes sense to not show a banner for them;
they'll still appear in the notification list in the calendar.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4265

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1893>
This commit is contained in:
Florian Müllner 2021-06-18 23:15:05 +02:00 committed by Marge Bot
parent 1f3fac047b
commit 0b8514dc7d

View File

@ -771,6 +771,9 @@ var Source = GObject.registerClass({
notification.acknowledged = false;
this.pushNotification(notification);
if (notification.urgency === Urgency.LOW)
return;
if (this.policy.showBanners || notification.urgency == Urgency.CRITICAL)
this.emit('notification-show', notification);
}