1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Don't use nested ternary if

This commit is contained in:
Dean Herbert 2017-12-12 13:07:34 +09:00
parent 8dea999908
commit 69653c7f4f

View File

@ -59,8 +59,12 @@ namespace osu.Game.Beatmaps.Drawables
case BeatmapGroupState.Expanded:
Header.State = PanelSelectedState.Selected;
foreach (BeatmapPanel panel in BeatmapPanels)
panel.State = panel == SelectedPanel ? PanelSelectedState.Selected :
!panel.Filtered ? PanelSelectedState.NotSelected : PanelSelectedState.Hidden;
if (panel == SelectedPanel)
panel.State = PanelSelectedState.Selected;
else if (panel.Filtered)
panel.State = PanelSelectedState.Hidden;
else
panel.State = PanelSelectedState.NotSelected;
break;
case BeatmapGroupState.Collapsed:
Header.State = PanelSelectedState.NotSelected;