From 16dd2a3323da15bf5a3c60c147cee340462e3f65 Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Sun, 6 Dec 2015 14:27:40 +0100 Subject: [PATCH] Fix showing unread messages count on active lobby chat button The lobby chat button text would change to include the unread messages count for a split second, even when the lobby chat was the current panel, leading to the button text sort of 'blinking' in an ugly way. --- OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index 9a172d34a4..988ecd6867 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -590,7 +590,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic var globalChatLabel = globalChatTab.Text; globalChatTab.GetText = () => { - if (globalChatUnreadMessages == 0) + if (globalChatUnreadMessages == 0 || chatPanel == ChatPanelType.Global) return globalChatLabel; return globalChatLabel + " ({0})".F(globalChatUnreadMessages); @@ -642,7 +642,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic var lobbyChatLabel = lobbyChatTab.Text; lobbyChatTab.GetText = () => { - if (lobbyChatUnreadMessages == 0) + if (lobbyChatUnreadMessages == 0 || chatPanel == ChatPanelType.Lobby) return lobbyChatLabel; return lobbyChatLabel + " ({0})".F(lobbyChatUnreadMessages);