From 6f1c00ff97c83e150491efe2b773e2a0616091e5 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Thu, 20 Mar 2025 20:51:38 +0900 Subject: [PATCH] Revert changes to spectate button cancellation --- .../Multiplayer/Match/MultiplayerSpectateButton.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MultiplayerSpectateButton.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MultiplayerSpectateButton.cs index 3c4f7eb9b1..13abe7bb14 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MultiplayerSpectateButton.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MultiplayerSpectateButton.cs @@ -33,7 +33,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match private readonly RoundedButton button; private IBindable operationInProgress = null!; - private long? lastPlaylistItemId; public MultiplayerSpectateButton() { @@ -114,6 +113,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match private void checkForAutomaticDownload() { + downloadCheckCancellation?.Cancel(); + if (client.Room == null) return; @@ -131,11 +132,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match MultiplayerPlaylistItem item = client.Room.CurrentPlaylistItem; - if (item.ID == lastPlaylistItemId) - return; - - downloadCheckCancellation?.Cancel(); - // In a perfect world we'd use BeatmapAvailability, but there's no event-driven flow for when a selection changes. // ie. if selection changes from "not downloaded" to another "not downloaded" we wouldn't get a value changed raised. beatmapLookupCache @@ -152,8 +148,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match beatmapDownloader.Download(beatmapSet); })); - - lastPlaylistItemId = item.ID; } #endregion