ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.51k stars 2.3k forks source link

Fix playlist room status resetting on enter #30805

Closed smoogipoo closed 5 days ago

smoogipoo commented 5 days ago

Fixes https://github.com/ppy/osu/issues/30792

The issue is that Room.Status is populated after deserialisation only by GetRoomsRequest (in the lounge) and not by GetRoomRequest (in the room). This PR applies a direct fix by moving the post-processing to a method that's called when any JSON deserialisation takes place, covering both requests.

It's not the best possible fix because there's probably no realistic use for this entire thing to be a class in the first place, as opposed to for example a helper method, enum, or even being applied in the existing property setters. But I don't consider this an important thing to change at the current moment.