mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 12:02:54 +08:00
Ensure old results are cleared from beatmap overlay on logout
This commit is contained in:
parent
d6032a2335
commit
e744840d07
@ -6,6 +6,7 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Graphics;
|
||||
@ -19,6 +20,7 @@ using osu.Game.Beatmaps.Drawables.Cards;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Overlays.BeatmapListing;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
@ -32,6 +34,11 @@ namespace osu.Game.Overlays
|
||||
[Resolved]
|
||||
private PreviewTrackManager previewTrackManager { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private IAPIProvider api { get; set; }
|
||||
|
||||
private IBindable<APIUser> apiUser;
|
||||
|
||||
private Drawable currentContent;
|
||||
private Container panelTarget;
|
||||
private FillFlowContainer<BeatmapCard> foundContent;
|
||||
@ -93,6 +100,13 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
base.LoadComplete();
|
||||
filterControl.CardSize.BindValueChanged(_ => onCardSizeChanged());
|
||||
|
||||
apiUser = api.LocalUser.GetBoundCopy();
|
||||
apiUser.BindValueChanged(_ =>
|
||||
{
|
||||
if (api.IsLoggedIn)
|
||||
addContentToResultsArea(Drawable.Empty());
|
||||
});
|
||||
}
|
||||
|
||||
public void ShowWithSearch(string query)
|
||||
|
Loading…
Reference in New Issue
Block a user