Group chat sources on the left in the message tray
This will make it easier for users to get back to their chats. https://bugzilla.gnome.org/show_bug.cgi?id=617234
This commit is contained in:
parent
0e4a47c0aa
commit
6c55ca59b0
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user