mirror of
https://github.com/ppy/osu
synced 2025-01-20 21:10:49 +00:00
Fix beatmap overlay not re-fetching results after login
This commit is contained in:
parent
a676acd80d
commit
d6032a2335
@ -67,6 +67,8 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
[Resolved]
|
||||
private IAPIProvider api { get; set; }
|
||||
|
||||
private IBindable<APIUser> apiUser;
|
||||
|
||||
public BeatmapListingFilterControl()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
@ -127,7 +129,7 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
private void load(OverlayColourProvider colourProvider, IAPIProvider api)
|
||||
{
|
||||
sortControlBackground.Colour = colourProvider.Background4;
|
||||
}
|
||||
@ -161,6 +163,9 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
|
||||
sortCriteria.BindValueChanged(_ => queueUpdateSearch());
|
||||
sortDirection.BindValueChanged(_ => queueUpdateSearch());
|
||||
|
||||
apiUser = api.LocalUser.GetBoundCopy();
|
||||
apiUser.BindValueChanged(_ => queueUpdateSearch());
|
||||
}
|
||||
|
||||
public void TakeFocus() => searchControl.TakeFocus();
|
||||
@ -190,6 +195,9 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
|
||||
resetSearch();
|
||||
|
||||
if (!api.IsLoggedIn)
|
||||
return;
|
||||
|
||||
queryChangedDebounce = Scheduler.AddDelayed(() =>
|
||||
{
|
||||
resetSearch();
|
||||
|
Loading…
Reference in New Issue
Block a user