telepathyClient: call this.updated() when a new message is added to a notification
When receiving another message or responding in a new expanded chat notification that has no prior chat history, the notification moved down below the edge of the screen instead of expanding up, making part of it invisible. Avoid this by making sure the notification's position is updated. https://bugzilla.gnome.org/show_bug.cgi?id=661944
This commit is contained in:
parent
731317230a
commit
d79e8b84c9
@ -577,7 +577,7 @@ const Notification = new Lang.Class({
|
|||||||
|
|
||||||
if (params.body)
|
if (params.body)
|
||||||
this.addBody(params.body, params.bodyMarkup);
|
this.addBody(params.body, params.bodyMarkup);
|
||||||
this._updated();
|
this.updated();
|
||||||
},
|
},
|
||||||
|
|
||||||
setIconVisible: function(visible) {
|
setIconVisible: function(visible) {
|
||||||
@ -616,7 +616,7 @@ const Notification = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._contentArea.add(actor, style ? style : {});
|
this._contentArea.add(actor, style ? style : {});
|
||||||
this._updated();
|
this.updated();
|
||||||
},
|
},
|
||||||
|
|
||||||
// addBody:
|
// addBody:
|
||||||
@ -679,7 +679,7 @@ const Notification = new Lang.Class({
|
|||||||
this._table.add_style_class_name('multi-line-notification');
|
this._table.add_style_class_name('multi-line-notification');
|
||||||
this._table.add(this._actionArea, props);
|
this._table.add(this._actionArea, props);
|
||||||
this._updateLastColumnSettings();
|
this._updateLastColumnSettings();
|
||||||
this._updated();
|
this.updated();
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateLastColumnSettings: function() {
|
_updateLastColumnSettings: function() {
|
||||||
@ -760,7 +760,7 @@ const Notification = new Lang.Class({
|
|||||||
this._buttonFocusManager.add_group(this._buttonBox);
|
this._buttonFocusManager.add_group(this._buttonBox);
|
||||||
button.connect('clicked', Lang.bind(this, this._onActionInvoked, id));
|
button.connect('clicked', Lang.bind(this, this._onActionInvoked, id));
|
||||||
|
|
||||||
this._updated();
|
this.updated();
|
||||||
},
|
},
|
||||||
|
|
||||||
setUrgency: function(urgency) {
|
setUrgency: function(urgency) {
|
||||||
@ -856,7 +856,7 @@ const Notification = new Lang.Class({
|
|||||||
if (this._canExpandContent()) {
|
if (this._canExpandContent()) {
|
||||||
this._addBannerBody();
|
this._addBannerBody();
|
||||||
this._table.add_style_class_name('multi-line-notification');
|
this._table.add_style_class_name('multi-line-notification');
|
||||||
this._updated();
|
this.updated();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}));
|
}));
|
||||||
@ -867,7 +867,7 @@ const Notification = new Lang.Class({
|
|||||||
(!this._titleFitsInBannerMode && !this._table.has_style_class_name('multi-line-notification'));
|
(!this._titleFitsInBannerMode && !this._table.has_style_class_name('multi-line-notification'));
|
||||||
},
|
},
|
||||||
|
|
||||||
_updated: function() {
|
updated: function() {
|
||||||
if (this.expanded)
|
if (this.expanded)
|
||||||
this.expand(false);
|
this.expand(false);
|
||||||
},
|
},
|
||||||
|
@ -853,6 +853,8 @@ const ChatNotification = new Lang.Class({
|
|||||||
|
|
||||||
this._lastGroupActor.add(body, props.childProps);
|
this._lastGroupActor.add(body, props.childProps);
|
||||||
|
|
||||||
|
this.updated();
|
||||||
|
|
||||||
let timestamp = props.timestamp;
|
let timestamp = props.timestamp;
|
||||||
this._history.unshift({ actor: body, time: timestamp,
|
this._history.unshift({ actor: body, time: timestamp,
|
||||||
realMessage: group != 'meta' });
|
realMessage: group != 'meta' });
|
||||||
|
Loading…
Reference in New Issue
Block a user