mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 08:13:10 +08:00
Merge branch 'master' into fix-notification-scheduled-events
This commit is contained in:
commit
e6876c95ac
@ -53,6 +53,11 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public override bool HandleInput => AllowSelection;
|
public override bool HandleInput => AllowSelection;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Used to avoid firing null selections before the initial beatmaps have been loaded via <see cref="BeatmapSets"/>.
|
||||||
|
/// </summary>
|
||||||
|
private bool initialLoadComplete;
|
||||||
|
|
||||||
private IEnumerable<CarouselBeatmapSet> beatmapSets => root.Children.OfType<CarouselBeatmapSet>();
|
private IEnumerable<CarouselBeatmapSet> beatmapSets => root.Children.OfType<CarouselBeatmapSet>();
|
||||||
|
|
||||||
public IEnumerable<BeatmapSetInfo> BeatmapSets
|
public IEnumerable<BeatmapSetInfo> BeatmapSets
|
||||||
@ -76,7 +81,11 @@ namespace osu.Game.Screens.Select
|
|||||||
itemsCache.Invalidate();
|
itemsCache.Invalidate();
|
||||||
scrollPositionCache.Invalidate();
|
scrollPositionCache.Invalidate();
|
||||||
|
|
||||||
Schedule(() => BeatmapSetsChanged?.Invoke());
|
Schedule(() =>
|
||||||
|
{
|
||||||
|
BeatmapSetsChanged?.Invoke();
|
||||||
|
initialLoadComplete = true;
|
||||||
|
});
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -513,7 +522,7 @@ namespace osu.Game.Screens.Select
|
|||||||
currentY += DrawHeight / 2;
|
currentY += DrawHeight / 2;
|
||||||
scrollableContent.Height = currentY;
|
scrollableContent.Height = currentY;
|
||||||
|
|
||||||
if (selectedBeatmapSet == null || selectedBeatmap == null || selectedBeatmapSet.State.Value != CarouselItemState.Selected)
|
if (initialLoadComplete && (selectedBeatmapSet == null || selectedBeatmap == null || selectedBeatmapSet.State.Value != CarouselItemState.Selected))
|
||||||
{
|
{
|
||||||
selectedBeatmapSet = null;
|
selectedBeatmapSet = null;
|
||||||
SelectionChanged?.Invoke(null);
|
SelectionChanged?.Invoke(null);
|
||||||
|
@ -71,10 +71,6 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
State = beatmap == null ? Visibility.Hidden : Visibility.Visible;
|
State = beatmap == null ? Visibility.Hidden : Visibility.Visible;
|
||||||
|
|
||||||
// ensure we ourselves are visible if not already.
|
|
||||||
if (!IsPresent)
|
|
||||||
State = Visibility.Visible;
|
|
||||||
|
|
||||||
Info?.FadeOut(250);
|
Info?.FadeOut(250);
|
||||||
Info?.Expire();
|
Info?.Expire();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user