overviewControls: only show chat icon in messages indicator for chats
Only show the chat icon in the new messages indicator when at least one among the outstanding notifications is a chat.
This commit is contained in:
parent
a90401454a
commit
aac312ca34
@ -452,9 +452,11 @@ const MessagesIndicator = new Lang.Class({
|
||||
|
||||
_updateCount: function() {
|
||||
let count = 0;
|
||||
let hasChats = false;
|
||||
this._sources.forEach(Lang.bind(this,
|
||||
function(source) {
|
||||
count += source.indicatorCount;
|
||||
hasChats |= source.isChat;
|
||||
}));
|
||||
|
||||
this._count = count;
|
||||
@ -462,6 +464,7 @@ const MessagesIndicator = new Lang.Class({
|
||||
"%d new messages",
|
||||
count).format(count);
|
||||
|
||||
this._icon.visible = hasChats;
|
||||
this._updateVisibility();
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user