[gnome-shell] calendar: Also update expanded body if necessary
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] calendar: Also update expanded body if necessary
- Date: Wed, 11 Mar 2015 00:48:05 +0000 (UTC)
commit 4c7eae7ef2a15ae186cdcae89222613dda1bd74a
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Mar 11 01:42:05 2015 +0100
calendar: Also update expanded body if necessary
As we use two separate body actors for expanded and unexpanded
notifications, updating only one of them on notification updates
is not enough - if the notification has already been expanded,
we need to update the second label as well.
js/ui/calendar.js | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index 7345ae0..67b757d 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -1045,6 +1045,8 @@ const Message = new Lang.Class({
this._bodyText = text;
this.bodyLabel.setMarkup(text ? text.replace(/\n/g, ' ') : '',
this._useBodyMarkup);
+ if (this._expandedLabel)
+ this._expandedLabel.setMarkup(text, this._useBodyMarkup);
},
setUseBodyMarkup: function(enable) {
@@ -1092,9 +1094,9 @@ const Message = new Lang.Class({
this._actionBin.visible = (this._actionBin.get_n_children() > 0);
if (this._bodyStack.get_n_children() < 2) {
- let expandedLabel = new URLHighlighter(this._bodyText,
- true, this._useBodyMarkup);
- this.setExpandedBody(expandedLabel.actor);
+ this._expandedLabel = new URLHighlighter(this._bodyText,
+ true, this._useBodyMarkup);
+ this.setExpandedBody(this._expandedLabel.actor);
}
if (animate) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]