From 6c6063464aed10ca52237ac764386fd1877a64a9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 4 Feb 2025 18:41:26 +0900 Subject: [PATCH] Remove `Scheduler.AddOnce` from `updateSpecifics` To keep things simple, let's not bother debouncing this. The debouncing was causing spectating handling to fail because of two interdependent components binding to `BeatmapAvailability`: Binding to update the screen's `Beatmap` after a download completes: https://github.com/ppy/osu/blob/58747061171c4ebe70201dfe4d3329ed7f4343f5/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs#L266-L267 Binding to attempt a load request: https://github.com/ppy/osu/blob/8bb7bea04e56fab9247baa59ae879e16c8b4bd9b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSubScreen.cs#L67 The first must update the beatmap before the second runs, else gameplay will not load due to `Beatmap.IsDefault`. --- osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs index 9f7e193131..f4d50b5170 100644 --- a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs @@ -427,7 +427,7 @@ namespace osu.Game.Screens.OnlinePlay.Match /// The screen to enter. protected abstract Screen CreateGameplayScreen(PlaylistItem selectedItem); - private void updateSpecifics() => Scheduler.AddOnce(() => + private void updateSpecifics() { if (!this.IsCurrentScreen() || SelectedItem.Value is not PlaylistItem item) return; @@ -487,7 +487,7 @@ namespace osu.Game.Screens.OnlinePlay.Match } else UserStyleSection.Hide(); - }); + } protected virtual APIMod[] GetGameplayMods() => UserMods.Value.Select(m => new APIMod(m)).Concat(SelectedItem.Value!.RequiredMods).ToArray();