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:
parent
e69f8716cd
commit
e329c160b3
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user