mirror of
https://github.com/osukey/osukey.git
synced 2025-05-06 06:07:26 +09: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]
|
[Resolved]
|
||||||
private IAPIProvider api { get; set; }
|
private IAPIProvider api { get; set; }
|
||||||
|
|
||||||
|
private IBindable<APIUser> apiUser;
|
||||||
|
|
||||||
public BeatmapListingFilterControl()
|
public BeatmapListingFilterControl()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
@ -127,7 +129,7 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OverlayColourProvider colourProvider)
|
private void load(OverlayColourProvider colourProvider, IAPIProvider api)
|
||||||
{
|
{
|
||||||
sortControlBackground.Colour = colourProvider.Background4;
|
sortControlBackground.Colour = colourProvider.Background4;
|
||||||
}
|
}
|
||||||
@ -161,6 +163,9 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
|
|
||||||
sortCriteria.BindValueChanged(_ => queueUpdateSearch());
|
sortCriteria.BindValueChanged(_ => queueUpdateSearch());
|
||||||
sortDirection.BindValueChanged(_ => queueUpdateSearch());
|
sortDirection.BindValueChanged(_ => queueUpdateSearch());
|
||||||
|
|
||||||
|
apiUser = api.LocalUser.GetBoundCopy();
|
||||||
|
apiUser.BindValueChanged(_ => queueUpdateSearch());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TakeFocus() => searchControl.TakeFocus();
|
public void TakeFocus() => searchControl.TakeFocus();
|
||||||
@ -190,6 +195,9 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
|
|
||||||
resetSearch();
|
resetSearch();
|
||||||
|
|
||||||
|
if (!api.IsLoggedIn)
|
||||||
|
return;
|
||||||
|
|
||||||
queryChangedDebounce = Scheduler.AddDelayed(() =>
|
queryChangedDebounce = Scheduler.AddDelayed(() =>
|
||||||
{
|
{
|
||||||
resetSearch();
|
resetSearch();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user