1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 15:05:34 +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() private void updateState()
{ {
if (showSelected) bool selected = selectedChannel.Value == Channel && !SelectorActive.Value;
if (selected)
selectBox.FadeIn(300, Easing.OutQuint); selectBox.FadeIn(300, Easing.OutQuint);
else else
selectBox.FadeOut(200, Easing.OutQuint); selectBox.FadeOut(200, Easing.OutQuint);
if (showUnread || showSelected) if (Unread.Value || selected)
text.FadeColour(colourProvider.Content1, 300, Easing.OutQuint); text.FadeColour(colourProvider.Content1, 300, Easing.OutQuint);
else else
text.FadeColour(colourProvider.Light3, 200, Easing.OutQuint); text.FadeColour(colourProvider.Light3, 200, Easing.OutQuint);
} }
private bool showUnread => Unread.Value;
private bool showSelected => selectedChannel.Value == Channel && !SelectorActive.Value;
} }
} }