Skip to content

Commit 6c60634

Browse files
committed
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`.
1 parent 8bb7bea commit 6c60634

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ protected void StartPlay()
427427
/// <returns>The screen to enter.</returns>
428428
protected abstract Screen CreateGameplayScreen(PlaylistItem selectedItem);
429429

430-
private void updateSpecifics() => Scheduler.AddOnce(() =>
430+
private void updateSpecifics()
431431
{
432432
if (!this.IsCurrentScreen() || SelectedItem.Value is not PlaylistItem item)
433433
return;
@@ -487,7 +487,7 @@ private void updateSpecifics() => Scheduler.AddOnce(() =>
487487
}
488488
else
489489
UserStyleSection.Hide();
490-
});
490+
}
491491

492492
protected virtual APIMod[] GetGameplayMods() => UserMods.Value.Select(m => new APIMod(m)).Concat(SelectedItem.Value!.RequiredMods).ToArray();
493493

0 commit comments

Comments
 (0)