mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue