mirror of
https://github.com/ppy/osu
synced 2025-01-11 08:39:31 +00:00
Fix local sorting calls an online request
This commit is contained in:
parent
9a81a44134
commit
44412f9ddb
@ -70,7 +70,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
Header.Tabs.Current.ValueChanged += _ => queueUpdate();
|
||||
|
||||
Filter.Tabs.Current.ValueChanged += _ => queueUpdate();
|
||||
Filter.Tabs.Current.ValueChanged += _ => onFilterUpdate();
|
||||
|
||||
Filter.DisplayStyleControl.DisplayStyle.ValueChanged += style => recreatePanels(style.NewValue);
|
||||
Filter.DisplayStyleControl.Dropdown.Current.ValueChanged += _ => updateUsers(Users);
|
||||
@ -180,6 +180,17 @@ namespace osu.Game.Overlays
|
||||
}, loadCancellation.Token);
|
||||
}
|
||||
|
||||
private void onFilterUpdate()
|
||||
{
|
||||
if (Users == null || Filter.Tabs.Current.Value == SocialSortCriteria.Rank)
|
||||
{
|
||||
queueUpdate();
|
||||
return;
|
||||
}
|
||||
|
||||
updateUsers(Users);
|
||||
}
|
||||
|
||||
private void updateUsers(IEnumerable<User> newUsers)
|
||||
{
|
||||
var sortDirection = Filter.DisplayStyleControl.Dropdown.Current.Value;
|
||||
|
Loading…
Reference in New Issue
Block a user