From aac312ca34ff0e2816ee45ee315d0d12f9834e7f Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Mon, 4 Mar 2013 16:23:45 -0500 Subject: [PATCH] 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. --- js/ui/overviewControls.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index 0906885ac..ba5c7a8f5 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -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(); },