mirror of
https://github.com/ppy/osu.git
synced 2026-05-18 20:30:27 +08:00
Do not show previous best score on solo results screen if the local user just beat it
Closes https://github.com/ppy/osu/issues/33109.
This commit is contained in:
@@ -10,6 +10,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Extensions;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.Leaderboards;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Select.Leaderboards;
|
||||
@@ -20,6 +21,9 @@ namespace osu.Game.Screens.Ranking
|
||||
{
|
||||
private readonly IBindable<LeaderboardScores?> globalScores = new Bindable<LeaderboardScores?>();
|
||||
|
||||
[Resolved]
|
||||
private IAPIProvider api { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private LeaderboardManager leaderboardManager { get; set; } = null!;
|
||||
|
||||
@@ -77,7 +81,7 @@ namespace osu.Game.Screens.Ranking
|
||||
Score.Position = clonedScore.Position;
|
||||
sortedScores.Add(Score);
|
||||
}
|
||||
else
|
||||
else if (criteria.Scope == BeatmapLeaderboardScope.Local || clonedScore.UserID != api.LocalUser.Value.OnlineID || clonedScore.TotalScore > Score.TotalScore)
|
||||
sortedScores.Add(clonedScore);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user