diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 1812983d9..aa1bdd13f 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -806,6 +806,7 @@ Source.prototype = { this._iconBin = new St.Bin({ width: this.ICON_SIZE, height: this.ICON_SIZE }); this.isTransient = false; + this.isChat = false; }, setTransient: function(isTransient) { @@ -1025,6 +1026,7 @@ MessageTray.prototype = { // added to the summary without a notification being shown. this._newSummaryItems = []; this._longestSummaryItem = null; + this._chatSummaryItemsCount = 0; }, _setSizePosition: function() { @@ -1058,7 +1060,12 @@ MessageTray.prototype = { let summaryItem = new SummaryItem(source); - this._summary.insert_actor(summaryItem.actor, 0); + if (source.isChat) { + this._summary.insert_actor(summaryItem.actor, 0); + this._chatSummaryItemsCount++; + } else { + this._summary.insert_actor(summaryItem.actor, this._chatSummaryItemsCount); + } let titleWidth = summaryItem.getTitleNaturalWidth(); if (titleWidth > this._summaryItemTitleWidth) { @@ -1123,6 +1130,10 @@ MessageTray.prototype = { this._newSummaryItems.splice(newSummaryItemsIndex, 1); this._summaryItems.splice(index, 1); + + if (source.isChat) + this._chatSummaryItemsCount--; + if (this._longestSummaryItem.source == source) { let newTitleWidth = 0; this._longestSummaryItem = null; diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js index ed8feae7d..8dcbfed5a 100644 --- a/js/ui/telepathyClient.js +++ b/js/ui/telepathyClient.js @@ -455,6 +455,8 @@ Source.prototype = { _init: function(accountPath, connPath, channelPath, targetHandle, targetHandleType, targetId) { MessageTray.Source.prototype._init.call(this, targetId); + this.isChat = true; + this._accountPath = accountPath; let connName = Telepathy.pathToName(connPath);