From d63013f075d2fff8b02d18f6d391b75026104301 Mon Sep 17 00:00:00 2001 From: Julian Sparber Date: Tue, 13 Feb 2024 19:41:08 +0100 Subject: [PATCH] messageTray: Rename bannerBodyMarkup to useBodyMarkup in Notification object I think the new name better reflects the effect of the property. Part-of: --- js/ui/calendar.js | 4 ++-- js/ui/messageTray.js | 4 ++-- js/ui/unlockDialog.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/ui/calendar.js b/js/ui/calendar.js index 7e2be6558..c0b62d540 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -768,7 +768,7 @@ export const NotificationMessage = GObject.registerClass( class NotificationMessage extends MessageList.Message { _init(notification) { super._init(notification.source, notification.title, notification.body); - this.setUseBodyMarkup(notification.bannerBodyMarkup); + this.setUseBodyMarkup(notification.useBodyMarkup); this.notification = notification; this.datetime = notification.datetime; @@ -805,7 +805,7 @@ class NotificationMessage extends MessageList.Message { this.setIcon(this._getIcon()); this.setTitle(n.title); this.setBody(n.body); - this.setUseBodyMarkup(n.bannerBodyMarkup); + this.setUseBodyMarkup(n.useBodyMarkup); } vfunc_clicked() { diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 023e56f4d..0d03e2541 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -409,7 +409,7 @@ export const Notification = GObject.registerClass({ this.privacyScope = PrivacyScope.USER; this.forFeedback = false; this.body = null; - this.bannerBodyMarkup = false; + this.useBodyMarkup = false; this.sound = null; this._soundPlayed = false; this.actions = []; @@ -442,7 +442,7 @@ export const Notification = GObject.registerClass({ this.title = title; this.body = banner; - this.bannerBodyMarkup = params.bannerMarkup; + this.useBodyMarkup = params.bannerMarkup; if (params.datetime) this.datetime = params.datetime; diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js index 08f10da53..15a3a984e 100644 --- a/js/ui/unlockDialog.js +++ b/js/ui/unlockDialog.js @@ -142,7 +142,7 @@ const NotificationsBox = GObject.registerClass({ let body = ''; if (n.body) { const bodyText = n.body.replace(/\n/g, ' '); - body = n.bannerBodyMarkup + body = n.useBodyMarkup ? bodyText : GLib.markup_escape_text(bodyText, -1); }