Skip to content

Commit

Permalink
Only update user rank panel display when ruleset matches
Browse files Browse the repository at this point in the history
Nothing behaviourally different, just reduce number of redundant calls.
  • Loading branch information
frenzibyte committed Nov 17, 2024
1 parent 07609b6 commit 1847b67
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion osu.Game/Users/UserRankPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ protected override void LoadComplete()
if (statisticsProvider != null)
{
statisticsUpdate = statisticsProvider.StatisticsUpdate.GetBoundCopy();
statisticsUpdate.BindValueChanged(_ => updateDisplay());
statisticsUpdate.BindValueChanged(u =>
{
if (u.NewValue.Ruleset.Equals(ruleset.Value))
updateDisplay();
});

ruleset.BindValueChanged(_ => updateDisplay(), true);
}
}
Expand Down

0 comments on commit 1847b67

Please sign in to comment.