From ddab3c6d8084a0c19289c56f53bdb779481ec4b6 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 4 May 2022 21:00:11 +0900 Subject: [PATCH] Tidy up state variables --- osu.Game/Overlays/Chat/ChannelList/ChannelListItem.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChannelList/ChannelListItem.cs b/osu.Game/Overlays/Chat/ChannelList/ChannelListItem.cs index e6a126f4d8..c5ac87f527 100644 --- a/osu.Game/Overlays/Chat/ChannelList/ChannelListItem.cs +++ b/osu.Game/Overlays/Chat/ChannelList/ChannelListItem.cs @@ -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; } }