Move tab channel class into tab item class

This commit is contained in:
Paul Teng 2019-05-12 06:31:11 -04:00
parent 8957ad5a7e
commit 7adaa09263
5 changed files with 12 additions and 19 deletions

View File

@ -93,7 +93,7 @@ namespace osu.Game.Tests.Visual.Online
AddUntilStep("remove all channels", () =>
{
var first = channelTabControl.Items.First();
if (first is ChannelSelectorTabChannel)
if (first is ChannelSelectorTabItem.ChannelSelectorTabChannel)
return true;
channelTabControl.RemoveChannel(first);

View File

@ -87,7 +87,7 @@ namespace osu.Game.Online.Chat
private void currentChannelChanged(ValueChangedEvent<Channel> e)
{
if (!(e.NewValue is ChannelSelectorTabChannel))
if (!(e.NewValue is ChannelSelectorTabItem.ChannelSelectorTabChannel))
JoinChannel(e.NewValue);
}

View File

@ -1,15 +0,0 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Online.Chat;
namespace osu.Game.Overlays.Chat.Tabs
{
public class ChannelSelectorTabChannel : Channel
{
public ChannelSelectorTabChannel()
{
Name = "+";
}
}
}

View File

@ -31,5 +31,13 @@ namespace osu.Game.Overlays.Chat.Tabs
BackgroundInactive = colour.Gray2;
BackgroundActive = colour.Gray3;
}
public class ChannelSelectorTabChannel : Channel
{
public ChannelSelectorTabChannel()
{
Name = "+";
}
}
}
}

View File

@ -199,7 +199,7 @@ namespace osu.Game.Overlays
return;
}
if (e.NewValue is ChannelSelectorTabChannel)
if (e.NewValue is ChannelSelectorTabItem.ChannelSelectorTabChannel)
return;
textbox.Current.Disabled = e.NewValue.ReadOnly;
@ -271,7 +271,7 @@ namespace osu.Game.Overlays
private void selectTab(int index)
{
var channel = channelTabControl.Items.Skip(index).FirstOrDefault();
if (channel != null && !(channel is ChannelSelectorTabChannel))
if (channel != null && !(channel is ChannelSelectorTabItem.ChannelSelectorTabChannel))
channelTabControl.Current.Value = channel;
}