mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +00:00
Change updateMetrics parameter to be optional
This commit is contained in:
parent
dd6fbccb56
commit
69eb4ef983
@ -9,7 +9,6 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
using osu.Framework.Threading;
|
using osu.Framework.Threading;
|
||||||
@ -202,16 +201,16 @@ namespace osu.Game.Screens.Select
|
|||||||
requestedBeatmap.Metrics = res;
|
requestedBeatmap.Metrics = res;
|
||||||
Schedule(() => updateMetrics(res));
|
Schedule(() => updateMetrics(res));
|
||||||
};
|
};
|
||||||
lookup.Failure += e => Schedule(() => updateMetrics(null));
|
lookup.Failure += e => Schedule(() => updateMetrics());
|
||||||
api.Queue(lookup);
|
api.Queue(lookup);
|
||||||
loading.Show();
|
loading.Show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateMetrics(null);
|
updateMetrics();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateMetrics([CanBeNull] BeatmapMetrics metrics)
|
private void updateMetrics(BeatmapMetrics metrics = null)
|
||||||
{
|
{
|
||||||
var hasRatings = metrics?.Ratings?.Any() ?? false;
|
var hasRatings = metrics?.Ratings?.Any() ?? false;
|
||||||
var hasRetriesFails = (metrics?.Retries?.Any() ?? false) && (metrics.Fails?.Any() ?? false);
|
var hasRetriesFails = (metrics?.Retries?.Any() ?? false) && (metrics.Fails?.Any() ?? false);
|
||||||
|
Loading…
Reference in New Issue
Block a user