1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-05 21:54:47 +08:00

Add a check if the locally available score has files (#5260)

Add a check if the locally available score has files

Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
Dean Herbert
2019-07-05 15:54:27 +09:00
committed by GitHub
Unverified
2 changed files with 2 additions and 6 deletions
+1 -1
View File
@@ -65,6 +65,6 @@ namespace osu.Game.Scoring
protected override ArchiveDownloadRequest<ScoreInfo> CreateDownloadRequest(ScoreInfo score, bool minimiseDownload) => new DownloadReplayRequest(score);
protected override bool CheckLocalAvailability(ScoreInfo model, IQueryable<ScoreInfo> items) => items.Any(s => s.OnlineScoreID == model.OnlineScoreID);
protected override bool CheckLocalAvailability(ScoreInfo model, IQueryable<ScoreInfo> items) => items.Any(s => s.OnlineScoreID == model.OnlineScoreID && s.Files.Any());
}
}
@@ -86,11 +86,7 @@ namespace osu.Game.Screens.Play
}
}, true);
if (replayAvailability == ReplayAvailability.NotAvailable)
{
button.Enabled.Value = false;
button.Alpha = 0.6f;
}
button.Enabled.Value = replayAvailability != ReplayAvailability.NotAvailable;
}
private enum ReplayAvailability