1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Simplify channel retrieval expression

This commit is contained in:
Bartłomiej Dach 2022-05-29 18:58:27 +02:00
parent e69f8716cd
commit e329c160b3
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -26,8 +26,8 @@ namespace osu.Game.Overlays.Chat.ChannelList
public Action<Channel>? OnRequestSelect;
public Action<Channel>? OnRequestLeave;
public IEnumerable<Channel> Channels => groupFlow.Children.Where(child => child is ChannelGroup)
.Cast<ChannelGroup>()
public IEnumerable<Channel> Channels => groupFlow.Children
.OfType<ChannelGroup>()
.SelectMany(channelGroup => channelGroup.ItemFlow)
.Select(item => item.Channel);