diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs index 8e466525a419..0014ba1c6349 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs @@ -69,8 +69,10 @@ public IngameChatLogic(Widget widget, OrderManager orderManager, World world, Mo var teamMessage = modData.Translation.GetString(Team); var allMessage = modData.Translation.GetString(All); + // Only execute this once, the first time this widget is loaded if (TextNotificationsManager.MutedPlayers.Count == 0) - orderManager.LobbyInfo.Clients.ForEach((c) => TextNotificationsManager.MutedPlayers.Add(c.Index, false)); + foreach (var c in orderManager.LobbyInfo.Clients) + TextNotificationsManager.MutedPlayers.Add(c.Index, false); tabCompletion.Commands = chatTraits.OfType().ToArray().SelectMany(x => x.Commands.Keys); tabCompletion.Names = orderManager.LobbyInfo.Clients.Select(c => c.Name).Distinct().ToList();