1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-22 14:42:54 +08:00

Merge branch 'master' into import-stable-scores

This commit is contained in:
Dean Herbert 2019-07-05 15:54:33 +09:00 committed by GitHub
commit 598b0d668b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 17 deletions

View File

@ -178,6 +178,8 @@ namespace osu.Game.Beatmaps
if (beatmapInfo?.BeatmapSet == null || beatmapInfo == DefaultBeatmap?.BeatmapInfo) if (beatmapInfo?.BeatmapSet == null || beatmapInfo == DefaultBeatmap?.BeatmapInfo)
return DefaultBeatmap; return DefaultBeatmap;
lock (workingCache)
{
var cached = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID); var cached = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID);
if (cached != null) if (cached != null)
@ -193,6 +195,7 @@ namespace osu.Game.Beatmaps
return working; return working;
} }
}
/// <summary> /// <summary>
/// Perform a lookup query on available <see cref="BeatmapSetInfo"/>s. /// Perform a lookup query on available <see cref="BeatmapSetInfo"/>s.

View File

@ -114,6 +114,7 @@ namespace osu.Game.Database
lock (imported) lock (imported)
{ {
if (model != null)
imported.Add(model); imported.Add(model);
current++; current++;
@ -140,7 +141,7 @@ namespace osu.Game.Database
{ {
notification.CompletionText = imported.Count == 1 notification.CompletionText = imported.Count == 1
? $"Imported {imported.First()}!" ? $"Imported {imported.First()}!"
: $"Imported {current} {HumanisedModelName}s!"; : $"Imported {imported.Count} {HumanisedModelName}s!";
if (imported.Count > 0 && PresentImport != null) if (imported.Count > 0 && PresentImport != null)
{ {

View File

@ -69,6 +69,6 @@ namespace osu.Game.Scoring
protected override ArchiveDownloadRequest<ScoreInfo> CreateDownloadRequest(ScoreInfo score, bool minimiseDownload) => new DownloadReplayRequest(score); 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());
} }
} }

View File

@ -86,11 +86,7 @@ namespace osu.Game.Screens.Play
} }
}, true); }, true);
if (replayAvailability == ReplayAvailability.NotAvailable) button.Enabled.Value = replayAvailability != ReplayAvailability.NotAvailable;
{
button.Enabled.Value = false;
button.Alpha = 0.6f;
}
} }
private enum ReplayAvailability private enum ReplayAvailability