diff --git a/osu.Game/Online/Chat/Channel.cs b/osu.Game/Online/Chat/Channel.cs index 0c10ddde97..2878856159 100644 --- a/osu.Game/Online/Chat/Channel.cs +++ b/osu.Game/Online/Chat/Channel.cs @@ -56,8 +56,7 @@ namespace osu.Game.Online.Chat { messages = messages.Except(Messages).ToArray(); - foreach (Message message in messages) - Messages.Add(message); + Messages.AddRange(messages); purgeOldMessages(); diff --git a/osu.Game/Overlays/Chat/DrawableChannel.cs b/osu.Game/Overlays/Chat/DrawableChannel.cs index 38a736993e..840edaece2 100644 --- a/osu.Game/Overlays/Chat/DrawableChannel.cs +++ b/osu.Game/Overlays/Chat/DrawableChannel.cs @@ -86,8 +86,7 @@ namespace osu.Game.Overlays.Chat // Add up to last Channel.MAX_HISTORY messages var displayMessages = newMessages.Skip(Math.Max(0, newMessages.Count() - Channel.MAX_HISTORY)); - foreach (Message m in displayMessages) - flow.Add(new ChatLine(m)); + flow.AddRange(displayMessages.Select(m => new ChatLine(m))); if (!IsLoaded) return;