1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:47:28 +08:00

Use an array of channels to exclude from the overlay

This commit is contained in:
Jai Sharma 2022-05-25 15:15:26 +01:00
parent cd90d29315
commit c0da05dda0

View File

@ -56,6 +56,13 @@ namespace osu.Game.Overlays
private const float side_bar_width = 190;
private const float chat_bar_height = 60;
private readonly ChannelType[] excluded_channel_types = new[]
{
ChannelType.Multiplayer,
ChannelType.Spectator,
ChannelType.Temporary,
};
[Resolved]
private OsuConfigManager config { get; set; } = null!;
@ -402,6 +409,6 @@ namespace osu.Game.Overlays
}
private IEnumerable<Channel> filterToChatChannels(IEnumerable channels)
=> channels.Cast<Channel>().Where(c => c.Type == ChannelType.PM || c.Type == ChannelType.Public);
=> channels.Cast<Channel>().Where(c => !excluded_channel_types.Contains(c.Type));
}
}