mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Update with framework bindable changes
This commit is contained in:
@ -91,11 +91,11 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
graph.Colour = colours.Yellow;
|
||||
}
|
||||
|
||||
private void userChanged(User user)
|
||||
private void userChanged(ValueChangedEvent<User> e)
|
||||
{
|
||||
placeholder.FadeIn(fade_duration, Easing.Out);
|
||||
|
||||
if (user?.Statistics?.Ranks.Global == null)
|
||||
if (e.NewValue?.Statistics?.Ranks.Global == null)
|
||||
{
|
||||
rankText.Text = string.Empty;
|
||||
performanceText.Text = string.Empty;
|
||||
@ -105,7 +105,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
return;
|
||||
}
|
||||
|
||||
int[] userRanks = user.RankHistory?.Data ?? new[] { user.Statistics.Ranks.Global.Value };
|
||||
int[] userRanks = e.NewValue.RankHistory?.Data ?? new[] { e.NewValue.Statistics.Ranks.Global.Value };
|
||||
ranks = userRanks.Select((x, index) => new KeyValuePair<int, int>(index, x)).Where(x => x.Value != 0).ToArray();
|
||||
|
||||
if (ranks.Length > 1)
|
||||
|
@ -63,10 +63,10 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
||||
}
|
||||
};
|
||||
|
||||
this.user.ValueChanged += newUser =>
|
||||
this.user.ValueChanged += e =>
|
||||
{
|
||||
total.Count = newUser?.Kudosu.Total ?? 0;
|
||||
avaliable.Count = newUser?.Kudosu.Available ?? 0;
|
||||
total.Count = e.NewValue?.Kudosu.Total ?? 0;
|
||||
avaliable.Count = e.NewValue?.Kudosu.Available ?? 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -93,13 +93,13 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
User.TriggerChange();
|
||||
}
|
||||
|
||||
private void onUserChanged(User newUser)
|
||||
private void onUserChanged(ValueChangedEvent<User> e)
|
||||
{
|
||||
VisiblePages = 0;
|
||||
ItemsContainer.Clear();
|
||||
ShowMoreButton.Hide();
|
||||
|
||||
if (newUser != null)
|
||||
if (e.NewValue != null)
|
||||
ShowMore();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user