messageTray: Don't call _createPolicy() unconditionally

Since commit 932ccac1c27, the Source constructor takes a
properties object instead of individual arguments.

That means that the policy may now be set through a construct
property, and we shouldn't override it if that was the case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3170>
This commit is contained in:
Florian Müllner 2024-02-06 18:10:50 +01:00 committed by Marge Bot
parent 60fb2de15f
commit ebec609207

View File

@ -614,7 +614,8 @@ export const Source = GObject.registerClass({
this.notifications = []; this.notifications = [];
this._policy = this._createPolicy(); if (!this._policy)
this._policy = this._createPolicy();
} }
get policy() { get policy() {