mirror of
https://github.com/ppy/osu
synced 2024-12-16 20:05:41 +00:00
Merge pull request #4116 from ekrctb/fix-import-beatmap-completion-notification-click
Fix PresentBeatmap not working for unsubmitted beatmap set
This commit is contained in:
commit
55fb401532
@ -221,13 +221,18 @@ namespace osu.Game
|
||||
return;
|
||||
}
|
||||
|
||||
var databasedSet = BeatmapManager.QueryBeatmapSet(s => s.OnlineBeatmapSetID == beatmap.OnlineBeatmapSetID);
|
||||
var databasedSet = beatmap.OnlineBeatmapSetID != null ?
|
||||
BeatmapManager.QueryBeatmapSet(s => s.OnlineBeatmapSetID == beatmap.OnlineBeatmapSetID) :
|
||||
BeatmapManager.QueryBeatmapSet(s => s.Hash == beatmap.Hash);
|
||||
|
||||
// Use first beatmap available for current ruleset, else switch ruleset.
|
||||
var first = databasedSet.Beatmaps.Find(b => b.Ruleset == ruleset.Value) ?? databasedSet.Beatmaps.First();
|
||||
if (databasedSet != null)
|
||||
{
|
||||
// Use first beatmap available for current ruleset, else switch ruleset.
|
||||
var first = databasedSet.Beatmaps.Find(b => b.Ruleset == ruleset.Value) ?? databasedSet.Beatmaps.First();
|
||||
|
||||
ruleset.Value = first.Ruleset;
|
||||
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(first);
|
||||
ruleset.Value = first.Ruleset;
|
||||
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(first);
|
||||
}
|
||||
}
|
||||
|
||||
switch (currentScreen)
|
||||
|
Loading…
Reference in New Issue
Block a user