mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 09:42:54 +08:00
Fix clicking the beatmap import notification at the daily challenge screen exiting to main menu
This commit is contained in:
parent
43f1fe350d
commit
3c05b975a0
@ -44,7 +44,7 @@ using osuTK;
|
||||
namespace osu.Game.Screens.OnlinePlay.DailyChallenge
|
||||
{
|
||||
[Cached(typeof(IPreviewTrackOwner))]
|
||||
public partial class DailyChallenge : OsuScreen, IPreviewTrackOwner
|
||||
public partial class DailyChallenge : OsuScreen, IPreviewTrackOwner, IHandlePresentBeatmap
|
||||
{
|
||||
private readonly Room room;
|
||||
private readonly PlaylistItem playlistItem;
|
||||
@ -546,5 +546,23 @@ namespace osu.Game.Screens.OnlinePlay.DailyChallenge
|
||||
if (metadataClient.IsNotNull())
|
||||
metadataClient.MultiplayerRoomScoreSet -= onRoomScoreSet;
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
private OsuGame? game { get; set; }
|
||||
|
||||
public void PresentBeatmap(WorkingBeatmap beatmap, RulesetInfo ruleset)
|
||||
{
|
||||
if (!this.IsCurrentScreen())
|
||||
return;
|
||||
|
||||
// We can only handle the current daily challenge beatmap.
|
||||
// If the import was for a different beatmap, pass the duty off to global handling.
|
||||
if (beatmap.BeatmapSetInfo.OnlineID != playlistItem.Beatmap.BeatmapSet!.OnlineID)
|
||||
{
|
||||
game?.PresentBeatmap(beatmap.BeatmapSetInfo, b => b.ID == beatmap.BeatmapInfo.ID);
|
||||
}
|
||||
|
||||
// And if we're handling, we don't really have much to do here.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user