Code quality

This commit is contained in:
Jai Sharma 2022-05-27 20:12:00 +01:00
parent e950c8c1d0
commit c5845f307a

View File

@ -27,9 +27,9 @@ namespace osu.Game.Overlays.Chat.ChannelList
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.Where(child => child is ChannelGroup)
.Cast<ChannelGroup>() .Cast<ChannelGroup>()
.SelectMany(channelGroup => channelGroup.ItemFlow) .SelectMany(channelGroup => channelGroup.ItemFlow)
.Select(item => item.Channel); .Select(item => item.Channel);
public readonly ChannelListing.ChannelListingChannel ChannelListingChannel = new ChannelListing.ChannelListingChannel(); public readonly ChannelListing.ChannelListingChannel ChannelListingChannel = new ChannelListing.ChannelListingChannel();
@ -144,9 +144,7 @@ namespace osu.Game.Overlays.Chat.ChannelList
private class ChannelGroup : FillFlowContainer private class ChannelGroup : FillFlowContainer
{ {
public FillFlowContainer<ChannelListItem> ItemFlow => flow; public readonly FillFlowContainer<ChannelListItem> ItemFlow;
private readonly FillFlowContainer<ChannelListItem> flow;
public ChannelGroup(LocalisableString label) public ChannelGroup(LocalisableString label)
{ {
@ -163,7 +161,7 @@ namespace osu.Game.Overlays.Chat.ChannelList
Margin = new MarginPadding { Left = 18, Bottom = 5 }, Margin = new MarginPadding { Left = 18, Bottom = 5 },
Font = OsuFont.Torus.With(size: 12, weight: FontWeight.SemiBold), Font = OsuFont.Torus.With(size: 12, weight: FontWeight.SemiBold),
}, },
flow = new FillFlowContainer<ChannelListItem> ItemFlow = new FillFlowContainer<ChannelListItem>
{ {
Direction = FillDirection.Vertical, Direction = FillDirection.Vertical,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,