diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 7e265af02..343529043 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -411,10 +411,8 @@ export class Notification extends GObject.Object { if (params.clear) this.clearActions(); - if (this.sound !== params.sound) { + if (this.sound !== params.sound) this.sound = params.sound; - this._soundPlayed = false; - } this.emit('updated', params.clear); } @@ -495,14 +493,9 @@ export class Notification extends GObject.Object { } playSound() { - if (this._soundPlayed) + if (!this.source.policy.enableSound) return; - if (!this.source.policy.enableSound) { - this._soundPlayed = true; - return; - } - this.sound?.play(this.title); }