[gnome-shell] messageTray: Do not show low priority notifications



commit 0b8514dc7d075f4fd6682da7037af405d9cc97ba
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jun 18 23:15:05 2021 +0200

    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>

 js/ui/messageTray.js | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 654bada6b2..8a5c262a99 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -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);
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]