mirror of
https://github.com/ppy/osu
synced 2025-03-01 17:11:12 +00:00
Fix user bindable being assigned rather than bound
This commit is contained in:
parent
b660366d96
commit
096998d5f4
@ -28,26 +28,18 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
private readonly bool includeWeight;
|
||||
private readonly ScoreType type;
|
||||
private int visiblePages;
|
||||
private readonly Bindable<User> user;
|
||||
|
||||
private readonly Bindable<User> user = new Bindable<User>();
|
||||
|
||||
private RulesetStore rulesets;
|
||||
private APIAccess api;
|
||||
|
||||
private void setUser(User newUser)
|
||||
{
|
||||
visiblePages = 0;
|
||||
scoreContainer.Clear();
|
||||
showMoreButton.Hide();
|
||||
missing.Show();
|
||||
showMore();
|
||||
}
|
||||
|
||||
public PaginatedScoreContainer(ScoreType type, Bindable<User> user, string header, bool includeWeight = false)
|
||||
{
|
||||
this.type = type;
|
||||
this.includeWeight = includeWeight;
|
||||
this.user = user;
|
||||
user.ValueChanged += setUser;
|
||||
this.user.BindTo(user);
|
||||
this.user.ValueChanged += user_ValueChanged;
|
||||
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
@ -95,6 +87,15 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
};
|
||||
}
|
||||
|
||||
private void user_ValueChanged(User newUser)
|
||||
{
|
||||
visiblePages = 0;
|
||||
scoreContainer.Clear();
|
||||
showMoreButton.Hide();
|
||||
missing.Show();
|
||||
showMore();
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(APIAccess api, RulesetStore rulesets)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user