mirror of
https://github.com/osukey/osukey.git
synced 2025-05-31 10:27:26 +09: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;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -19,6 +20,7 @@ using osu.Game.Beatmaps.Drawables.Cards;
|
|||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Overlays.BeatmapListing;
|
using osu.Game.Overlays.BeatmapListing;
|
||||||
using osu.Game.Resources.Localisation.Web;
|
using osu.Game.Resources.Localisation.Web;
|
||||||
@ -32,6 +34,11 @@ namespace osu.Game.Overlays
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private PreviewTrackManager previewTrackManager { get; set; }
|
private PreviewTrackManager previewTrackManager { get; set; }
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private IAPIProvider api { get; set; }
|
||||||
|
|
||||||
|
private IBindable<APIUser> apiUser;
|
||||||
|
|
||||||
private Drawable currentContent;
|
private Drawable currentContent;
|
||||||
private Container panelTarget;
|
private Container panelTarget;
|
||||||
private FillFlowContainer<BeatmapCard> foundContent;
|
private FillFlowContainer<BeatmapCard> foundContent;
|
||||||
@ -93,6 +100,13 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
filterControl.CardSize.BindValueChanged(_ => onCardSizeChanged());
|
filterControl.CardSize.BindValueChanged(_ => onCardSizeChanged());
|
||||||
|
|
||||||
|
apiUser = api.LocalUser.GetBoundCopy();
|
||||||
|
apiUser.BindValueChanged(_ =>
|
||||||
|
{
|
||||||
|
if (api.IsLoggedIn)
|
||||||
|
addContentToResultsArea(Drawable.Empty());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowWithSearch(string query)
|
public void ShowWithSearch(string query)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user