1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:52:55 +08:00

Make score setter private

This commit is contained in:
Dean Herbert 2022-01-28 21:59:29 +09:00
parent b85b2c01fb
commit 661fec7c8a
3 changed files with 5 additions and 5 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
@ -100,7 +101,7 @@ namespace osu.Game.Tests.Visual.SongSelect
public void TestGlobalScoresDisplay()
{
AddStep(@"Set scope", () => leaderboard.Scope = BeatmapLeaderboardScope.Global);
AddStep(@"New Scores", () => leaderboard.Scores = generateSampleScores(null));
AddStep(@"New Scores", () => leaderboard.SetScores(generateSampleScores(null)));
}
[Test]
@ -422,6 +423,8 @@ namespace osu.Game.Tests.Visual.SongSelect
{
PlaceholderState = state;
}
public void SetScores(ICollection<ScoreInfo> scores) => Scores = scores;
}
}
}

View File

@ -128,9 +128,6 @@ namespace osu.Game.Tests.Visual.UserInterface
scoreManager.Undelete(r.All<ScoreInfo>().Where(s => s.DeletePending).ToList());
});
leaderboard.Scores = null;
leaderboard.FinishTransforms(true); // After setting scores, we may be waiting for transforms to expire drawables
leaderboard.BeatmapInfo = beatmapInfo;
leaderboard.RefetchScores(); // Required in the case that the beatmap hasn't changed
});

View File

@ -61,7 +61,7 @@ namespace osu.Game.Online.Leaderboards
public ICollection<TScoreInfo> Scores
{
get => scores;
set
protected set
{
scores = value;