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() {
|
_updateCount: function() {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
|
let hasChats = false;
|
||||||
this._sources.forEach(Lang.bind(this,
|
this._sources.forEach(Lang.bind(this,
|
||||||
function(source) {
|
function(source) {
|
||||||
count += source.indicatorCount;
|
count += source.indicatorCount;
|
||||||
|
hasChats |= source.isChat;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._count = count;
|
this._count = count;
|
||||||
@ -462,6 +464,7 @@ const MessagesIndicator = new Lang.Class({
|
|||||||
"%d new messages",
|
"%d new messages",
|
||||||
count).format(count);
|
count).format(count);
|
||||||
|
|
||||||
|
this._icon.visible = hasChats;
|
||||||
this._updateVisibility();
|
this._updateVisibility();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user