From 1e4bca90f08e10a89c09729027e65db672f9b3a1 Mon Sep 17 00:00:00 2001 From: Jorolf Date: Fri, 26 May 2017 12:10:16 +0200 Subject: [PATCH] remove duplicate code --- osu.Game/Overlays/Chat/ChatTabControl.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChatTabControl.cs b/osu.Game/Overlays/Chat/ChatTabControl.cs index fdfda92214..9c26632a8b 100644 --- a/osu.Game/Overlays/Chat/ChatTabControl.cs +++ b/osu.Game/Overlays/Chat/ChatTabControl.cs @@ -24,9 +24,7 @@ namespace osu.Game.Overlays.Chat private const float shear_width = 10; - private readonly Bindable channelSelectorActive = new Bindable(); - - public Bindable ChannelSelectorActive => channelSelectorActive; + public readonly Bindable ChannelSelectorActive = new Bindable(); public ChatTabControl() { @@ -43,7 +41,7 @@ namespace osu.Game.Overlays.Chat Padding = new MarginPadding(10), }); - AddTabItem(new ChannelTabItem.ChannelSelectorTabItem(new Channel { Name = "+" }, channelSelectorActive)); + AddTabItem(new ChannelTabItem.ChannelSelectorTabItem(new Channel { Name = "+" }, ChannelSelectorActive)); } private class ChannelTabItem : TabItem @@ -122,6 +120,11 @@ namespace osu.Game.Overlays.Chat backgroundHover = colours.Gray7; highlightBox.Colour = colours.Yellow; + } + + protected override void LoadComplete() + { + base.LoadComplete(); updateState(); } @@ -232,8 +235,6 @@ namespace osu.Game.Overlays.Chat { backgroundInactive = colour.Gray2; backgroundActive = colour.Gray3; - - updateState(); } } }