mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Simplify channel retrieval expression
This commit is contained in:
@ -26,8 +26,8 @@ namespace osu.Game.Overlays.Chat.ChannelList
|
|||||||
public Action<Channel>? OnRequestSelect;
|
public Action<Channel>? OnRequestSelect;
|
||||||
public Action<Channel>? OnRequestLeave;
|
public Action<Channel>? OnRequestLeave;
|
||||||
|
|
||||||
public IEnumerable<Channel> Channels => groupFlow.Children.Where(child => child is ChannelGroup)
|
public IEnumerable<Channel> Channels => groupFlow.Children
|
||||||
.Cast<ChannelGroup>()
|
.OfType<ChannelGroup>()
|
||||||
.SelectMany(channelGroup => channelGroup.ItemFlow)
|
.SelectMany(channelGroup => channelGroup.ItemFlow)
|
||||||
.Select(item => item.Channel);
|
.Select(item => item.Channel);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user