From ebec609207b84b3334b6ce01ccc97df8b579c6b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 6 Feb 2024 18:10:50 +0100 Subject: [PATCH] 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: --- js/ui/messageTray.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 2d21e98f4..d5cdf686e 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -614,7 +614,8 @@ export const Source = GObject.registerClass({ this.notifications = []; - this._policy = this._createPolicy(); + if (!this._policy) + this._policy = this._createPolicy(); } get policy() {