Fix the check of beatmapset local availability

This commit is contained in:
Jamie Taylor 2019-02-28 16:14:50 +09:00
parent 3a3c2ae21a
commit 8cf83e2f4a
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using Microsoft.EntityFrameworkCore.Internal;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Containers;
@ -41,7 +41,7 @@ private void load(BeatmapManager beatmaps)
{
if (setInfo.NewValue == null)
attachDownload(null);
else if (beatmaps.QueryBeatmapSets(s => s.OnlineBeatmapSetID == setInfo.NewValue.OnlineBeatmapSetID).Any())
else if (beatmaps.GetAllUsableBeatmapSetsEnumerable().Any(s => s.OnlineBeatmapSetID == setInfo.NewValue.OnlineBeatmapSetID))
State.Value = DownloadState.LocallyAvailable;
else
attachDownload(beatmaps.GetExistingDownload(setInfo.NewValue));