use resolved attribute

This commit is contained in:
cdwcgt 2022-12-15 21:01:38 +09:00
parent 3d6d3b4025
commit c9cffc8248
No known key found for this signature in database
GPG Key ID: 144396D01095C3A2
1 changed files with 3 additions and 4 deletions

View File

@ -73,7 +73,8 @@ public partial class LeaderboardScore : OsuClickableContainer, IHasContextMenu,
public ITooltip<ScoreInfo> GetCustomTooltip() => new LeaderboardScoreTooltip();
public virtual ScoreInfo TooltipContent => Score;
private ScoreManager scoreManager = null!;
[Resolved]
private ScoreManager scoreManager { get; set; } = null!;
public LeaderboardScore(ScoreInfo score, int? rank, bool isOnlineScope = true)
{
@ -87,14 +88,12 @@ public LeaderboardScore(ScoreInfo score, int? rank, bool isOnlineScope = true)
}
[BackgroundDependencyLoader]
private void load(IAPIProvider api, OsuColour colour, ScoreManager scoreManager)
private void load(IAPIProvider api, OsuColour colour)
{
var user = Score.User;
statisticsLabels = GetStatistics(Score).Select(s => new ScoreComponentLabel(s)).ToList();
this.scoreManager = scoreManager;
ClickableAvatar innerAvatar;
Children = new Drawable[]