Ensure current channel is set to the ChannelListingChannel when it becomes null

This commit is contained in:
Jai Sharma
2022-05-19 11:45:39 +01:00
parent 136ecb45e2
commit c37d1e4fae
3 changed files with 12 additions and 6 deletions

View File

@ -22,9 +22,9 @@ namespace osu.Game.Overlays.Chat.ChannelList
public Action<Channel>? OnRequestSelect;
public Action<Channel>? OnRequestLeave;
private readonly Dictionary<Channel, ChannelListItem> channelMap = new Dictionary<Channel, ChannelListItem>();
public readonly ChannelListing.ChannelListingChannel ChannelListingChannel = new ChannelListing.ChannelListingChannel();
private readonly ChannelListing.ChannelListingChannel channelListingChannel = new ChannelListing.ChannelListingChannel();
private readonly Dictionary<Channel, ChannelListItem> channelMap = new Dictionary<Channel, ChannelListItem>();
private ChannelListItemFlow publicChannelFlow = null!;
private ChannelListItemFlow privateChannelFlow = null!;
@ -54,7 +54,7 @@ namespace osu.Game.Overlays.Chat.ChannelList
Children = new Drawable[]
{
publicChannelFlow = new ChannelListItemFlow("CHANNELS"),
selector = new ChannelListItem(channelListingChannel)
selector = new ChannelListItem(ChannelListingChannel)
{
Margin = new MarginPadding { Bottom = 10 },
},