mirror of
https://github.com/ppy/osu
synced 2025-02-26 15:40:56 +00:00
Remove unnecessary coercions
Comparisons to null of nullable numbers are always false.
This commit is contained in:
parent
e2950d7027
commit
811553cd60
@ -53,7 +53,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
private void updateDisplay()
|
||||
{
|
||||
Ratings.Metrics = BeatmapSet?.Metrics;
|
||||
ratingBox.Alpha = (BeatmapSet?.OnlineInfo?.Status ?? 0) > 0 ? 1 : 0;
|
||||
ratingBox.Alpha = BeatmapSet?.OnlineInfo?.Status > 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
public Details()
|
||||
|
@ -132,7 +132,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
tags.Text = b.NewValue?.Metadata.Tags ?? string.Empty;
|
||||
genre.Text = b.NewValue?.OnlineInfo?.Genre?.Name ?? string.Empty;
|
||||
language.Text = b.NewValue?.OnlineInfo?.Language?.Name ?? string.Empty;
|
||||
var setHasLeaderboard = (b.NewValue?.OnlineInfo?.Status ?? 0) > 0;
|
||||
var setHasLeaderboard = b.NewValue?.OnlineInfo?.Status > 0;
|
||||
successRate.Alpha = setHasLeaderboard ? 1 : 0;
|
||||
unrankedPlaceholder.Alpha = setHasLeaderboard ? 0 : 1;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user