diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js index 8c7d92eca..1cb0c2587 100644 --- a/js/ui/components/telepathyClient.js +++ b/js/ui/components/telepathyClient.js @@ -586,7 +586,6 @@ const ChatNotification = new Lang.Class({ _init: function(source) { this.parent(source, source.title, null, { customContent: true, secondaryGIcon: source.getSecondaryIcon() }); - this.setResident(true); this._responseEntry = new St.Entry({ style_class: 'chat-response', can_focus: true }); diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index bbad8616c..e698c57c3 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -490,7 +490,6 @@ const Notification = new Lang.Class({ this.source = source; this.title = title; this.urgency = Urgency.NORMAL; - this.resident = false; // 'transient' is a reserved keyword in JS, so we have to use an alternate variable name this.isTransient = false; this.isMusic = false; @@ -847,14 +846,8 @@ const Notification = new Lang.Class({ button.connect('clicked', Lang.bind(this, function() { callback(); - if (!this.resident) { - // We don't hide a resident notification when the user invokes one of its actions, - // because it is common for such notifications to update themselves with new - // information based on the action. We'd like to display the updated information - // in place, rather than pop-up a new notification. - this.emit('done-displaying'); - this.destroy(); - } + this.emit('done-displaying'); + this.destroy(); })); this.updated(); @@ -880,10 +873,6 @@ const Notification = new Lang.Class({ this.urgency = urgency; }, - setResident: function(resident) { - this.resident = resident; - }, - setTransient: function(isTransient) { this.isTransient = isTransient; }, @@ -1121,12 +1110,8 @@ const Notification = new Lang.Class({ _onClicked: function() { this.emit('clicked'); - // We hide all types of notifications once the user clicks on them because the common - // outcome of clicking should be the relevant window being brought forward and the user's - // attention switching to the window. this.emit('done-displaying'); - if (!this.resident) - this.destroy(); + this.destroy(); }, _onDestroy: function() { @@ -1294,7 +1279,7 @@ const Source = new Lang.Class({ }, get indicatorCount() { - let notifications = this.notifications.filter(function(n) { return !n.isTransient && !n.resident; }); + let notifications = this.notifications.filter(function(n) { return !n.isTransient; }); return notifications.length; }, @@ -1307,7 +1292,7 @@ const Source = new Lang.Class({ }, get isClearable() { - return !this.trayIcon && !this.isChat && !this.resident; + return !this.trayIcon && !this.isChat; }, countUpdated: function() { @@ -1451,10 +1436,9 @@ const Source = new Lang.Class({ open: function() { }, - destroyNonResidentNotifications: function() { + destroyNotifications: function() { for (let i = this.notifications.length - 1; i >= 0; i--) - if (!this.notifications[i].resident) - this.notifications[i].destroy(); + this.notifications[i].destroy(); this.countUpdated(); }, diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index 23872a568..7828d7cf9 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -475,7 +475,7 @@ const FdoNotificationDaemon = new Lang.Class({ for (let i = 0; i < this._sources.length; i++) { let source = this._sources[i]; if (source.app == tracker.focus_app) { - source.destroyNonResidentNotifications(); + source.destroyNotifications(); return; } } @@ -630,7 +630,7 @@ const FdoNotificationDaemonSource = new Lang.Class({ open: function() { this.openApp(); - this.destroyNonResidentNotifications(); + this.destroyNotifications(); }, _lastNotificationRemoved: function() {