mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
Fix current selection not being correctly maintained when BeatmapPicker
updates its display
This commit is contained in:
parent
5efffa208a
commit
6de4e05e49
@ -183,7 +183,14 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
}
|
}
|
||||||
|
|
||||||
starRatingContainer.FadeOut(100);
|
starRatingContainer.FadeOut(100);
|
||||||
Beatmap.Value = Difficulties.FirstOrDefault()?.Beatmap;
|
|
||||||
|
// If a selection is already made, try and maintain it.
|
||||||
|
if (Beatmap.Value != null)
|
||||||
|
Beatmap.Value = Difficulties.FirstOrDefault(b => b.Beatmap.OnlineID == Beatmap.Value.OnlineID)?.Beatmap;
|
||||||
|
|
||||||
|
// Else just choose the first available difficulty for now.
|
||||||
|
Beatmap.Value ??= Difficulties.FirstOrDefault()?.Beatmap;
|
||||||
|
|
||||||
plays.Value = BeatmapSet?.PlayCount ?? 0;
|
plays.Value = BeatmapSet?.PlayCount ?? 0;
|
||||||
favourites.Value = BeatmapSet?.FavouriteCount ?? 0;
|
favourites.Value = BeatmapSet?.FavouriteCount ?? 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user