mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 19:22:54 +08:00
Merge pull request #4362 from nekodex/fix-download-button
Fix download buttons displaying wrong state for deleted beatmapsets
This commit is contained in:
commit
1eafc9d4c1
@ -2,7 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.EntityFrameworkCore.Internal;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -41,7 +41,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
{
|
{
|
||||||
if (setInfo.NewValue == null)
|
if (setInfo.NewValue == null)
|
||||||
attachDownload(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;
|
State.Value = DownloadState.LocallyAvailable;
|
||||||
else
|
else
|
||||||
attachDownload(beatmaps.GetExistingDownload(setInfo.NewValue));
|
attachDownload(beatmaps.GetExistingDownload(setInfo.NewValue));
|
||||||
|
Loading…
Reference in New Issue
Block a user