Replaced ForEach with loop, moved Trim outside.
This commit is contained in:
@@ -78,7 +78,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
orderManager.IssueOrder(Order.Chat(team, chatText.Text.Trim()));
|
||||
else
|
||||
if (chatTraits != null)
|
||||
chatTraits.ForEach(x => x.OnChat(orderManager.LocalClient.Name, chatText.Text.Trim()));
|
||||
{
|
||||
var text = chatText.Text.Trim();
|
||||
foreach (var trait in chatTraits)
|
||||
trait.OnChat(orderManager.LocalClient.Name, text);
|
||||
}
|
||||
|
||||
CloseChat();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user