1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 03:27:24 +08:00

Invert data length checks for consistency

This commit is contained in:
Bartłomiej Dach 2020-03-21 14:45:32 +01:00
parent d167e0c8b9
commit af7d6d0a4e

View File

@ -92,15 +92,15 @@ namespace osu.Game.Overlays.Profile
private void redrawGraph()
{
if (!(data?.Length > 1))
if (data?.Length > 1)
{
HideGraph();
graph.DefaultValueCount = data.Length;
graph.Values = data.Select(pair => GetDataPointHeight(pair.Value)).ToArray();
ShowGraph();
return;
}
graph.DefaultValueCount = data.Length;
graph.Values = data.Select(pair => GetDataPointHeight(pair.Value)).ToArray();
ShowGraph();
HideGraph();
}
/// <summary>
@ -120,11 +120,13 @@ namespace osu.Game.Overlays.Profile
{
get
{
if (!(data?.Length > 1))
return null;
if (data?.Length > 1)
{
var (key, value) = data[dataIndex];
return GetTooltipContent(key, value);
}
var (key, value) = data[dataIndex];
return GetTooltipContent(key, value);
return null;
}
}