notificationDaemon: use different reason when replacing notification
Differently from the fd.o notifications, Gtk notifications do not have a mechanism to update themselves. Instead, when a new notification is received for an ID already known to the notification daemon, the old notification is dismissed and a replaced with a new one. Currently though, there is no way to distinguish a notification that was dismissed because of an user interaction, or because it was replaced. That is an useful piece of information, so add a new value to the NotificationDestroyedReason enum to account for it. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/258
This commit is contained in:

committed by
Florian Müllner

parent
80a7547129
commit
a98ed08a54
@ -690,7 +690,7 @@ var GtkNotificationDaemonAppSource = new Lang.Class({
|
||||
this._notificationPending = true;
|
||||
|
||||
if (this._notifications[notificationId])
|
||||
this._notifications[notificationId].destroy();
|
||||
this._notifications[notificationId].destroy(MessageTray.NotificationDestroyedReason.REPLACED);
|
||||
|
||||
let notification = this._createNotification(notificationParams);
|
||||
notification.connect('destroy', () => {
|
||||
|
Reference in New Issue
Block a user