mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Handle the case where a map hasn't been rated yet
This commit is contained in:
parent
2bd425d64f
commit
dbb03bcff2
@ -38,7 +38,7 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
|
|
||||||
negativeRatings.Text = negativeCount.ToString();
|
negativeRatings.Text = negativeCount.ToString();
|
||||||
positiveRatings.Text = (totalCount - negativeCount).ToString();
|
positiveRatings.Text = (totalCount - negativeCount).ToString();
|
||||||
ratingsBar.Length = (float)negativeCount / totalCount;
|
ratingsBar.Length = totalCount == 0 ? 0 : (float)negativeCount / totalCount;
|
||||||
graph.Values = ratings.GetRange(0, rating_range).Select(r => (float)r);
|
graph.Values = ratings.GetRange(0, rating_range).Select(r => (float)r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user