1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Fix intro screen

Fix things
This commit is contained in:
Dean Herbert 2021-12-15 14:36:11 +09:00
parent abd72c496b
commit 8696f82627
2 changed files with 3 additions and 3 deletions

View File

@ -173,7 +173,7 @@ namespace osu.Game.Beatmaps
/// </summary>
/// <param name="query">The query.</param>
/// <returns>Results from the provided query.</returns>
public IEnumerable<BeatmapSetInfo> QueryBeatmapSets(Expression<Func<BeatmapSetInfo, bool>> query) => beatmapModelManager.QueryBeatmapSets(query);
public ILive<IEnumerable<BeatmapSetInfo>> QueryBeatmapSets(Expression<Func<BeatmapSetInfo, bool>> query) => beatmapModelManager.QueryBeatmapSets(query).ToLive(contextFactory);
/// <summary>
/// Perform a lookup query on available <see cref="BeatmapSetInfo"/>s.

View File

@ -100,7 +100,7 @@ namespace osu.Game.Screens.Menu
if (sets.Count > 0)
{
setInfo = beatmaps.QueryBeatmapSet(s => s.ID == sets[RNG.Next(0, sets.Count - 1)].ID);
initialBeatmap = beatmaps.GetWorkingBeatmap(setInfo.Beatmaps[0]);
initialBeatmap = beatmaps.GetWorkingBeatmap(setInfo?.Beatmaps[0]);
}
}
@ -113,7 +113,7 @@ namespace osu.Game.Screens.Menu
// this could happen if a user has nuked their files store. for now, reimport to repair this.
var import = beatmaps.Import(new ZipArchiveReader(game.Resources.GetStream($"Tracks/{BeatmapFile}"), BeatmapFile)).GetResultSafely();
import.PerformWrite(b =>
import?.PerformWrite(b =>
{
b.Protected = true;
beatmaps.Update(b);