mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 21:02:55 +08:00
Invert data length checks for consistency
This commit is contained in:
parent
d167e0c8b9
commit
af7d6d0a4e
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user