mirror of
https://github.com/ppy/osu
synced 2025-01-09 15:49:32 +00:00
Avoid refresh if score is not related to current display
This commit is contained in:
parent
fc442713bb
commit
f8b09b7c81
@ -98,18 +98,22 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
TopScore = null;
|
||||
}
|
||||
|
||||
private void onScoreRemoved(ValueChangedEvent<WeakReference<ScoreInfo>> score)
|
||||
private void onScoreRemoved(ValueChangedEvent<WeakReference<ScoreInfo>> score) =>
|
||||
scoreStoreChanged(score);
|
||||
|
||||
private void onScoreAdded(ValueChangedEvent<WeakReference<ScoreInfo>> score) =>
|
||||
scoreStoreChanged(score);
|
||||
|
||||
private void scoreStoreChanged(ValueChangedEvent<WeakReference<ScoreInfo>> score)
|
||||
{
|
||||
if (Scope != BeatmapLeaderboardScope.Local)
|
||||
return;
|
||||
|
||||
RefreshScores();
|
||||
}
|
||||
|
||||
private void onScoreAdded(ValueChangedEvent<WeakReference<ScoreInfo>> score)
|
||||
{
|
||||
if (Scope != BeatmapLeaderboardScope.Local)
|
||||
return;
|
||||
if (score.NewValue.TryGetTarget(out var scoreInfo))
|
||||
{
|
||||
if (Beatmap.ID != scoreInfo.BeatmapInfoID)
|
||||
return;
|
||||
}
|
||||
|
||||
RefreshScores();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user