Schedule play button state update

Revealed by the framework-side transform thread safety checks. `Stopped`
is even annotated as not being thread-safe (but was annotated as such
long after the class's nascence).
This commit is contained in:
Bartłomiej Dach 2021-01-08 19:59:13 +01:00
parent 8a7a1fc40a
commit 52789118a3

View File

@ -142,7 +142,9 @@ namespace osu.Game.Overlays.BeatmapListing.Panels
AddInternal(preview);
loading = false;
preview.Stopped += () => Playing.Value = false;
// make sure that the update of value of Playing (and the ensuing value change callbacks)
// are marshaled back to the update thread.
preview.Stopped += () => Schedule(() => Playing.Value = false);
// user may have changed their mind.
if (Playing.Value)