1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 14:02:55 +08:00

Convert if to switch

This commit is contained in:
miterosan 2018-04-09 22:29:48 +02:00
parent 96bacaf13f
commit 762b4412e5

View File

@ -247,16 +247,16 @@ namespace osu.Game.Overlays
textbox.Current.Disabled = chat.ReadOnly;
if (chat is ChannelChat channelChat)
switch (chat)
{
channelTabs.Current.Value = channelChat;
userTabs.DeselectAll();
}
if (chat is UserChat userChat)
{
userTabs.Current.Value = userChat;
channelTabs.DeselectAll();
case ChannelChat channelChat:
channelTabs.Current.Value = channelChat;
userTabs.DeselectAll();
break;
case UserChat userChat:
userTabs.Current.Value = userChat;
channelTabs.DeselectAll();
break;
}
var loaded = loadedChannels.Find(d => d.Chat == chat);