Merge pull request #10185 from obrakmann/fix-lobby-chat-unread-messages-button-blinking

Fix showing unread messages count on active lobby chat button
This commit is contained in:
RoosterDragon
2015-12-08 20:48:08 +00:00

View File

@@ -590,7 +590,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var globalChatLabel = globalChatTab.Text; var globalChatLabel = globalChatTab.Text;
globalChatTab.GetText = () => globalChatTab.GetText = () =>
{ {
if (globalChatUnreadMessages == 0) if (globalChatUnreadMessages == 0 || chatPanel == ChatPanelType.Global)
return globalChatLabel; return globalChatLabel;
return globalChatLabel + " ({0})".F(globalChatUnreadMessages); return globalChatLabel + " ({0})".F(globalChatUnreadMessages);
@@ -642,7 +642,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var lobbyChatLabel = lobbyChatTab.Text; var lobbyChatLabel = lobbyChatTab.Text;
lobbyChatTab.GetText = () => lobbyChatTab.GetText = () =>
{ {
if (lobbyChatUnreadMessages == 0) if (lobbyChatUnreadMessages == 0 || chatPanel == ChatPanelType.Lobby)
return lobbyChatLabel; return lobbyChatLabel;
return lobbyChatLabel + " ({0})".F(lobbyChatUnreadMessages); return lobbyChatLabel + " ({0})".F(lobbyChatUnreadMessages);