messageTray: Let the tray decide whether to show a banner
Always use the same code path to add new messages to a source, and let the `MessageTray` decide whether it shows a banner. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
This commit is contained in:

committed by
Florian Müllner

parent
940b658071
commit
34f05b075b
@ -280,7 +280,7 @@ async function _initializeUI() {
|
||||
notification.addAction(_('Undo'),
|
||||
() => (global.context.unsafe_mode = false));
|
||||
notification.setTransient(true);
|
||||
source.showNotification(notification);
|
||||
source.addNotification(notification);
|
||||
});
|
||||
|
||||
// Provide the bus object for gnome-session to
|
||||
@ -616,7 +616,7 @@ export function notify(msg, details) {
|
||||
const source = MessageTray.getSystemSource();
|
||||
let notification = new MessageTray.Notification(source, msg, details);
|
||||
notification.setTransient(true);
|
||||
source.showNotification(notification);
|
||||
source.addNotification(notification);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user