1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 04:42:58 +08:00

Enable NRT on BeatmapDetails

This commit is contained in:
Salman Ahmed 2022-07-15 06:52:06 +03:00
parent 97c3eea3aa
commit 86d019c2b2

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
@ -38,18 +36,18 @@ namespace osu.Game.Screens.Select
private readonly LoadingLayer loading;
[Resolved]
private IAPIProvider api { get; set; }
private IAPIProvider api { get; set; } = null!;
[Resolved(canBeNull: true)]
private SongSelect songSelect { get; set; }
[Resolved]
private SongSelect? songSelect { get; set; }
private IBeatmapInfo beatmapInfo;
private IBeatmapInfo? beatmapInfo;
private APIFailTimes failTimes;
private APIFailTimes? failTimes;
private int[] ratings;
private int[]? ratings;
public IBeatmapInfo BeatmapInfo
public IBeatmapInfo? BeatmapInfo
{
get => beatmapInfo;
set
@ -59,7 +57,7 @@ namespace osu.Game.Screens.Select
beatmapInfo = value;
var onlineInfo = beatmapInfo as IBeatmapOnlineInfo;
var onlineSetInfo = beatmapInfo.BeatmapSet as IBeatmapSetOnlineInfo;
var onlineSetInfo = beatmapInfo?.BeatmapSet as IBeatmapSetOnlineInfo;
failTimes = onlineInfo?.FailTimes;
ratings = onlineSetInfo?.Ratings;