1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 19:27:24 +08:00

Merge pull request #3742 from peppy/support-all-channels

Add support for all channel types
This commit is contained in:
Dan Balasescu 2018-11-20 16:00:19 +09:00 committed by GitHub
commit 51c192d4b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -5,7 +5,11 @@ namespace osu.Game.Online.Chat
{ {
public enum ChannelType public enum ChannelType
{ {
Public,
Multiplayer,
Spectator,
Temporary,
PM, PM,
Public Group,
} }
} }

View File

@ -56,12 +56,10 @@ namespace osu.Game.Overlays.Chat.Tabs
{ {
switch (value.Type) switch (value.Type)
{ {
case ChannelType.Public: default:
return new ChannelTabItem(value) { OnRequestClose = tabCloseRequested }; return new ChannelTabItem(value) { OnRequestClose = tabCloseRequested };
case ChannelType.PM: case ChannelType.PM:
return new PrivateChannelTabItem(value) { OnRequestClose = tabCloseRequested }; return new PrivateChannelTabItem(value) { OnRequestClose = tabCloseRequested };
default:
throw new InvalidOperationException("Only TargetType User and Channel are supported.");
} }
} }