mirror of https://github.com/ppy/osu
Add support for all channel types
This commit is contained in:
parent
1b86318ab4
commit
23a446bab2
|
@ -5,7 +5,11 @@ namespace osu.Game.Online.Chat
|
|||
{
|
||||
public enum ChannelType
|
||||
{
|
||||
Public,
|
||||
Multiplayer,
|
||||
Spectator,
|
||||
Temporary,
|
||||
PM,
|
||||
Public
|
||||
Group,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,12 +56,10 @@ protected override TabItem<Channel> CreateTabItem(Channel value)
|
|||
{
|
||||
switch (value.Type)
|
||||
{
|
||||
case ChannelType.Public:
|
||||
default:
|
||||
return new ChannelTabItem(value) { OnRequestClose = tabCloseRequested };
|
||||
case ChannelType.PM:
|
||||
return new PrivateChannelTabItem(value) { OnRequestClose = tabCloseRequested };
|
||||
default:
|
||||
throw new InvalidOperationException("Only TargetType User and Channel are supported.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue