1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:07:29 +08:00

Tidy up state variables

This commit is contained in:
Dean Herbert 2022-05-04 21:00:11 +09:00
parent 60999e83e0
commit ddab3c6d80

View File

@ -163,19 +163,17 @@ namespace osu.Game.Overlays.Chat.ChannelList
private void updateState()
{
if (showSelected)
bool selected = selectedChannel.Value == Channel && !SelectorActive.Value;
if (selected)
selectBox.FadeIn(300, Easing.OutQuint);
else
selectBox.FadeOut(200, Easing.OutQuint);
if (showUnread || showSelected)
if (Unread.Value || selected)
text.FadeColour(colourProvider.Content1, 300, Easing.OutQuint);
else
text.FadeColour(colourProvider.Light3, 200, Easing.OutQuint);
}
private bool showUnread => Unread.Value;
private bool showSelected => selectedChannel.Value == Channel && !SelectorActive.Value;
}
}