mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
messageTray: Don't set _notificationRemoved if destroyed notification is queued
When the user clears all notifications from the notification menu UI, it's possible for a queued notification to be destroyed after the currently displayed notification. The removal of the currently displayed notification is not processed until the notification menu is closed (due to `this._bannerBlocked`). By then, it's possible that `_notificationRemoved` has already been overwritten when `_onNotificationDestroy` is invoked with another (queued) notification. This eventually results in a notification banner that cannot be removed by the user as the notification object needed to do so has already been destroyed. Fix this by only assigning to `_notificationRemoved` if `this._notification == notification`. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2736>
This commit is contained in:
parent
15048c1fcb
commit
cde7d44a28
1 changed files with 2 additions and 3 deletions
|
|
@ -1006,9 +1006,8 @@ var MessageTray = GObject.registerClass({
|
|||
}
|
||||
|
||||
_onNotificationDestroy(notification) {
|
||||
this._notificationRemoved = this._notification === notification;
|
||||
|
||||
if (this._notificationRemoved) {
|
||||
if (this._notification === notification) {
|
||||
this._notificationRemoved = true;
|
||||
if (this._notificationState === State.SHOWN ||
|
||||
this._notificationState === State.SHOWING) {
|
||||
this._updateNotificationTimeout(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue